Functions | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac (CRYPTO_Type *base, uint8_t const *message, uint32_t messageSize, uint8_t const *key, cy_en_crypto_aes_key_length_t keyLength, uint8_t *cmac, cy_stc_crypto_aes_state_t *aesState) |
Calculates the AES Cipher-based Message Authentication Code (CMAC) on the input message with the provided key. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac (CRYPTO_Type *base, uint8_t *hmac, uint8_t const *message, uint32_t messageSize, uint8_t const *key, uint32_t keyLength, cy_en_crypto_sha_mode_t mode) |
Performs the HMAC calculation. More... | |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac | ( | CRYPTO_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t const * | key, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
uint8_t * | cmac, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Calculates the AES Cipher-based Message Authentication Code (CMAC) on the input message with the provided key.
base | The pointer to the CRYPTO instance. |
message | The pointer to the source plain text. Must be 4-byte aligned. |
messageSize | The size of the source plain text in bytes. |
key | The pointer to the encryption key. Must be 4-byte aligned. |
keyLength | cy_en_crypto_aes_key_length_t |
cmac | The pointer to the calculated CMAC. |
aesState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac | ( | CRYPTO_Type * | base, |
uint8_t * | hmac, | ||
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t const * | key, | ||
uint32_t | keyLength, | ||
cy_en_crypto_sha_mode_t | mode | ||
) |
Performs the HMAC calculation.
base | The pointer to the CRYPTO instance. |
hmac | The pointer to the calculated HMAC. Must be 4-byte aligned. |
message | The pointer to the message whose hash value is being computed. |
messageSize | The size of the message. |
key | The pointer to the key. |
keyLength | The length of the key. |
mode | cy_en_crypto_sha_mode_t |