Crypto - Thread Stack#
This module includes cryptographic functions.
Typedefs#
typedef otPlatCryptoSha256Hash
Represents a SHA-256 hash.
Functions#
void
otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash)
Performs HMAC computation.
void
otCryptoAesCcm(const otCryptoKey *aKey, 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)
Performs AES CCM computation.
Typedef Documentation#
otCryptoSha256Hash#
typedef otPlatCryptoSha256Hash otCryptoSha256Hash
Represents a SHA-256 hash.
Definition at line
62
of file include/openthread/crypto.h
Function Documentation#
otCryptoHmacSha256#
void otCryptoHmacSha256 (const otCryptoKey * aKey, const uint8_t * aBuf, uint16_t aBufLength, otCryptoSha256Hash * aHash)
Performs HMAC computation.
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
const otCryptoKey * | [in] | aKey | A pointer to the key. |
const uint8_t * | [in] | aBuf | A pointer to the input buffer. |
uint16_t | [in] | aBufLength | The length of |
otCryptoSha256Hash * | [out] | aHash | A pointer to a |
Definition at line
73
of file include/openthread/crypto.h
otCryptoAesCcm#
void otCryptoAesCcm (const otCryptoKey * aKey, 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)
Performs AES CCM computation.
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
const otCryptoKey * | [in] | aKey | A pointer to the key. |
uint8_t | [in] | aTagLength | Length of tag in bytes. |
const void * | [in] | aNonce | A pointer to the nonce. |
uint8_t | [in] | aNonceLength | Length of nonce in bytes. |
const void * | [in] | aHeader | A pointer to the header. |
uint32_t | [in] | aHeaderLength | Length of header in bytes. |
void * | [inout] | aPlainText | A pointer to the plaintext. |
void * | [inout] | aCipherText | A pointer to the ciphertext. |
uint32_t | [in] | aLength | Plaintext length in bytes. |
bool | [in] | aEncrypt |
|
void * | [out] | aTag | A pointer to the tag. |
Definition at line
94
of file include/openthread/crypto.h