MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Hmac_Functions

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.
 

Detailed Description

Defines all functions of mcuxClEls_Hmac.

Function Documentation

◆ mcuxClEls_Hmac_Async()

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.

Parameters
[in]optionsThe command options. For more information, see mcuxClEls_HmacOption_t.
[in]keyIdxThe HMAC key index, if an internal key shall be used
[in]pPaddedKeyPointer to a memory location containing the padded HMAC key
[in]pInputPointer to a memory location which contains the data to be authenticated
[in]inputLengthSize of pInput in bytes
[out]pOutputThe output message authentication code

The properties of some parameters change with respect to selected options.

Parameter properties
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:

options.extkey == MCUXCLELS_HMAC_EXTERNAL_KEY_DISABLE

keyIdx must be a valid key index with the correct usage rights for HMAC.

pPaddedKey is ignored.

Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
Return values
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request