Crypto
Questo modulo include funzioni crittografiche.
Sommario
Typedef | |
---|---|
otCryptoSha256Hash | typedefstruct otCryptoSha256Hash Questa struttura rappresenta un hash SHA-256. |
Variabili | |
---|---|
OT_TOOL_PACKED_END |
Funzioni | |
---|---|
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 Questo metodo esegue il calcolo AES CCM. |
otCryptoEcdsaSign (uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength) | Questo metodo crea il segno ECDSA. |
otCryptoHmacSha256 (const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash) | void Questa funzione esegue il calcolo HMAC. |
Structs | |
---|---|
otCryptoSha256Hash | Questa struttura rappresenta un hash SHA-256. |
Typedef
otCryptoSha256Hash
struct otCryptoSha256Hash otCryptoSha256Hash
Questa struttura rappresenta un hash SHA-256.
Variabili
OT_TOOL_PACKED_END
OT_TOOL_PACKED_BEGIN struct otCryptoSha256Hash OT_TOOL_PACKED_END
Funzioni
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 )
Questo metodo esegue il calcolo AES CCM.
Dettagli | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parametri |
|
otCryptoEcdsaSign
otError otCryptoEcdsaSign( uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength )
Questo metodo crea il segno ECDSA.
Dettagli | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parametri |
| ||||||||||||
Valori restituiti |
|
otCryptoHmacSha256
void otCryptoHmacSha256( const uint8_t *aKey, uint16_t aKeyLength, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash )
Questa funzione esegue il calcolo HMAC.
Dettagli | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parametri |
|
Macro
OT_CRYPTO_SHA256_HASH_SIZE
OT_CRYPTO_SHA256_HASH_SIZE 32
Lunghezza dell'hash SHA256 (in byte).