Crypto
Ce module comprend des fonctions cryptographiques.
Sommaire
Typedefs | |
---|---|
otCryptoSha256Hash | typedefstruct otCryptoSha256Hash Cette structure représente un hachage SHA-256. |
Variables | |
---|---|
OT_TOOL_PACKED_END |
Les fonctions | |
---|---|
otCryptoAesCcm (const uint8_t *aKey, uint16_t aKeyLength, uint8_t aTagLength, const void *aNonce, uint8_t aNonceLength, const void *aHeader, uint32_t aHeaderLength, void *aPlainText, void *aCipherText, uint32_t aLength, bool aEncrypt, void *aTag) | void Cette méthode effectue le calcul AES CCM. |
otCryptoEcdsaSign (uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength) | Cette méthode crée le signe ECDSA. |
otCryptoHmacSha256 (const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash) | void Cette fonction effectue le calcul HMAC. |
Structs | |
---|---|
otCryptoSha256Hash | Cette structure représente un hachage SHA-256. |
Typedefs
otCryptoSha256Hash
struct otCryptoSha256Hash otCryptoSha256Hash
Cette structure représente un hachage SHA-256.
Variables
OT_TOOL_PACKED_END
OT_TOOL_PACKED_BEGIN struct otCryptoSha256Hash OT_TOOL_PACKED_END
Les fonctions
otCryptoAesCcm
void otCryptoAesCcm( const uint8_t *aKey, uint16_t aKeyLength, uint8_t aTagLength, const void *aNonce, uint8_t aNonceLength, const void *aHeader, uint32_t aHeaderLength, void *aPlainText, void *aCipherText, uint32_t aLength, bool aEncrypt, void *aTag )
Cette méthode effectue le calcul AES CCM.
Détails | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Paramètres |
|
otCryptoEcdsaSign
otError otCryptoEcdsaSign( uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength )
Cette méthode crée le signe ECDSA.
Détails | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Paramètres |
| ||||||||||||
Valeurs de retour |
|
otCryptoHmacSha256
void otCryptoHmacSha256( const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash )
Cette fonction effectue le calcul HMAC.
Détails | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Paramètres |
|
Macros
OT_CRYPTO_SHA256_HASH_SIZE
OT_CRYPTO_SHA256_HASH_SIZE 32
Longueur du hachage SHA256 (en octets).