Criptográfico
Este módulo inclui funções criptográficas.
Resumo
Typedefs | |
---|---|
otCryptoSha256Hash | typedefstruct otCryptoSha256Hash Esta estrutura representa um hash SHA-256. |
Variáveis | |
---|---|
OT_TOOL_PACKED_END |
Funções | |
---|---|
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 Este método executa o cálculo AES CCM. |
otCryptoEcdsaSign (uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength) | Este método cria o sinal ECDSA. |
otCryptoHmacSha256 (const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash) | void Esta função realiza cálculos HMAC. |
Structs | |
---|---|
otCryptoSha256Hash | Esta estrutura representa um hash SHA-256. |
Typedefs
otCryptoSha256Hash
struct otCryptoSha256Hash otCryptoSha256Hash
Esta estrutura representa um hash SHA-256.
Variáveis
OT_TOOL_PACKED_END
OT_TOOL_PACKED_BEGIN struct otCryptoSha256Hash OT_TOOL_PACKED_END
Funções
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 )
Este método executa o cálculo AES CCM.
Detalhes | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parâmetros |
|
otCryptoEcdsaSign
otError otCryptoEcdsaSign( uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength )
Este método cria o sinal ECDSA.
Detalhes | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parâmetros |
| ||||||||||||
Valores Retornados |
|
otCryptoHmacSha256
void otCryptoHmacSha256( const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash )
Esta função realiza cálculos HMAC.
Detalhes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parâmetros |
|
Macros
OT_CRYPTO_SHA256_HASH_SIZE
OT_CRYPTO_SHA256_HASH_SIZE 32
Comprimento do hash SHA256 (em bytes).