SX_MAC_CREATE_AESCMAC
C
typedef int (*FUNC_SX_MAC_CREATE_AESCMAC)(struct sxmac *c, const struct sxkeyref *key); #define SX_MAC_CREATE_AESCMAC ((FUNC_SX_MAC_CREATE_AESCMAC)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_AESCMAC)))
Description
Prepares an AES CMAC generation.
This function initializes the user allocated object \p c with a new AES CMAC operation context needed to run the CMAC generation. After successful execution of this function, the context \p c can be passed to any of the CMAC functions. @pre - key reference provided by \p key must be initialized using SX_KEYREF_LOAD_MATERIAL() or SX_KEYREF_LOAD_BY_ID()
Parameters
Param | Description |
---|---|
c | CMAC operation context |
key | Key used for the CMAC generation operation, expected size 16, 24 or 32 bytes |
Returns
SX_OK SX_ERR_INVALID_KEYREF SX_ERR_INVALID_KEY_SZ SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY