Defines all functions of mcuxClEls_Hmac. More...
Functions | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Hmac_Async (mcuxClEls_HmacOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pPaddedKey, uint8_t const *pInput, size_t inputLength, uint8_t *pOutput) |
Performs HMAC with SHA-256. More... | |
Defines all functions of mcuxClEls_Hmac.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Hmac_Async | ( | mcuxClEls_HmacOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pPaddedKey, | ||
uint8_t const * | pInput, | ||
size_t | inputLength, | ||
uint8_t * | pOutput | ||
) |
Performs HMAC with SHA-256.
Call mcuxClEls_WaitForOperation to complete the operation.
[in] | options | The command options. For more information, see mcuxClEls_HmacOption_t. |
[in] | keyIdx | The HMAC key index, if an internal key shall be used |
[in] | pPaddedKey | Pointer to a memory location containing the padded HMAC key |
[in] | pInput | Pointer to a memory location which contains the data to be authenticated |
[in] | inputLength | Size of pInput in bytes |
[out] | pOutput | The output message authentication code |
The properties of some parameters change with respect to selected options.
options.extkey
== MCUXCLELS_HMAC_EXTERNAL_KEY_ENABLE keyIdx
is ignored.
pPaddedKey
must contain the padded HMAC key, which can mean one of two things depending on the length of the original HMAC key, LkHMAC:
If LkHMAC ≤ MCUXCLELS_HMAC_PADDED_KEY_SIZE, pPaddedKey
must be the HMAC key padded with zero-bytes to fill the required length of MCUXCLELS_HMAC_PADDED_KEY_SIZE bytes.
pPaddedKey
must contain the SHA-256 hash of the HMAC key, padded with zero-bytes to fill the required length of MCUXCLELS_HMAC_PADDED_KEY_SIZE bytes.options.extkey
== MCUXCLELS_HMAC_EXTERNAL_KEY_DISABLE keyIdx
must be a valid key index with the correct usage rights for HMAC.
pPaddedKey
is ignored.
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |