GUID D35B19AE 30B6 42EB 80E0 E184688A4835

C

SX_MAC_CREATE_HMAC_SHA2_256

C

typedef int (*FUNC_SX_MAC_CREATE_HMAC_SHA256)(struct sxmac *c, struct sxkeyref *keyref);
#define SX_MAC_CREATE_HMAC_SHA2_256                      ((FUNC_SX_MAC_CREATE_HMAC_SHA256)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_HMAC_SHA2_256)))

Description

Prepares a HMAC SHA256 MAC operation

This function initializes the user allocated object \p c with a new MAC operation context and reserves the HW resource. After successful execution of this function, the context \p c can be passed to any of the hashing functions (except the ones that are specific to context-saving).

Parameters

ParamDescription
cMAC Operation context
hmackeyHMAC key
kszSize in bytes of the HMAC key, can be any size

Returns

SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY

SX_MAC_CREATE_HMAC_SHA2_384

C

typedef int (*FUNC_SX_MAC_CREATE_HMAC_SHA384)(struct sxmac *c, struct sxkeyref *keyref);
#define SX_MAC_CREATE_HMAC_SHA2_384                      ((FUNC_SX_MAC_CREATE_HMAC_SHA384)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_HMAC_SHA2_384)))

Description

Prepares a HMAC SHA384 MAC operation This function initializes the user allocated object \p c with a new MAC operation context and reserves the HW resource. After successful execution of this function, the context \p c can be passed to any of the hashing functions (except the ones that are specific to context-saving). remark - \p hmackey buffer should not be changed until the operation is completed.

Parameters

ParamDescription
cMAC Operation context
hmackeyHMAC key
kszSize in bytes of the HMAC key, can be any size

Returns

SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY

SX_MAC_CREATE_HMAC_SHA2_512

C

typedef int (*FUNC_SX_MAC_CREATE_HMAC_SHA2_512)(struct sxmac *c, struct sxkeyref *keyref);
#define SX_MAC_CREATE_HMAC_SHA2_512                      ((FUNC_SX_MAC_CREATE_HMAC_SHA2_512)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_HMAC_SHA2_512)))

Description

Prepares a HMAC SHA512 MAC operation This function initializes the user allocated object \p c with a new MAC operation context and reserves the HW resource. After successful execution of this function, the context \p c can be passed to any of the hashing functions (except the ones that are specific to context-saving). remark - \p hmackey buffer should not be changed until the operation is completed.

Parameters

ParamDescription
cMAC Operation context
hmackeyHMAC key
kszSize in bytes of the HMAC key, can be any size

Returns

SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY

SX_MAC_CREATE_HMAC_SHA1

C

typedef int (*FUNC_SX_MAC_CREATE_HMAC_SHA1)(struct sxmac *c, struct sxkeyref *keyref);
#define SX_MAC_CREATE_HMAC_SHA1                        ((FUNC_SX_MAC_CREATE_HMAC_SHA1)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_HMAC_SHA1)))

Description

Prepares a HMAC SHA1 MAC operation This function initializes the user allocated object \p c with a new MAC operation context and reserves the HW resource. After successful execution of this function, the context \p c can be passed to any of the hashing functions (except the ones that are specific to context-saving). remark - \p hmackey buffer should not be changed until the operation is completed.

Parameters

ParamDescription
cMAC Operation context
hmackeyHMAC key
kszSize in bytes of the HMAC key, can be any size

Returns

SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY

SX_MAC_CREATE_HMAC_SHA2_224

C

typedef int (*FUNC_SX_MAC_CREATE_HMAC_SHA224)(struct sxmac *c, struct sxkeyref *keyref);
#define SX_MAC_CREATE_HMAC_SHA2_224                      ((FUNC_SX_MAC_CREATE_HMAC_SHA224)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_MAC_CREATE_HMAC_SHA2_224)))

Description

Prepares a HMAC SHA224 MAC operation This function initializes the user allocated object \p c with a new MAC operation context and reserves the HW resource. After successful execution of this function, the context \p c can be passed to any of the hashing functions (except the ones that are specific to context-saving). remark - \p hmackey buffer should not be changed until the operation is completed.

Parameters

ParamDescription
cMAC Operation context
hmackeyHMAC key
kszSize in bytes of the HMAC key, can be any size

Returns

SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY