SXHASHALG_SHA2_224 Macro
C
#define SXHASHALG_SHA2_224 ((const struct sxhashalg *)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SXHASHALG_SHA2_224)))
Description
Hash algorithm SHA-2 224. Has only 32 bit capacity against length extension attacks.
SXHASHALG_SHA2_256 Macro
C
#define SXHASHALG_SHA2_256 ((const struct sxhashalg *)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SXHASHALG_SHA2_256)))
Description
Hash algorithm SHA-2 256. Has no resistance against length extension attacks.
SXHASHALG_SHA2_384 Macro
C
#define SXHASHALG_SHA2_384 ((const struct sxhashalg *)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SXHASHALG_SHA2_384)))
Description
Hash algorithm SHA-2 384. Has 128 bit capacity against length extension attacks.
SXHASHALG_SHA2_512 Macro
C
#define SXHASHALG_SHA2_512 ((const struct sxhashalg *)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SXHASHALG_SHA2_512)))
Description
Hash algorithm SHA-2 512. Has no resistance against length extension attacks.
SX_HASH_CREATE_SHA256
C
typedef int (*FUNC_SX_HASH_CREATE_SHA256)(struct sxhash *c, size_t csz); #define SX_HASH_CREATE_SHA256 ((FUNC_SX_HASH_CREATE_SHA256)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_HASH_CREATE_SHA256)))
Description
Prepares a SHA256 hash operation context
This function initializes the user allocated object \p c with a new hash 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. remark - SHA256 digest size is 32 bytes
Parameters
Param | Description |
---|---|
c | Hash operation context |
csz | size of the hash operation context |
Returns
SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY
SX_HASH_CREATE_SHA384
C
typedef int (*FUNC_SX_HASH_CREATE_SHA384)(struct sxhash *c, size_t csz); #define SX_HASH_CREATE_SHA384 ((FUNC_SX_HASH_CREATE_SHA384)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_HASH_CREATE_SHA384)))
Description
Prepares a SHA384 hash operation context
This function initializes the user allocated object \p c with a new hash 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. remark - SHA384 digest size is 48 bytes
Parameters
Param | Description |
---|---|
c | Hash operation context |
csz | size of the hash operation context |
Returns
SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY
SX_HASH_CREATE_SHA512
C
typedef int (*FUNC_SX_HASH_CREATE_SHA512)(struct sxhash *c, size_t csz); #define SX_HASH_CREATE_SHA512 ((FUNC_SX_HASH_CREATE_SHA512)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_HASH_CREATE_SHA512)))
Description
Prepares a SHA512 hash operation context
This function initializes the user allocated object \p c with a new hash 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. remark - SHA512 digest size is 64 bytes
Parameters
Param | Description |
---|---|
c | Hash operation context |
csz | size of the hash operation context |
Returns
SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY
SX_HASH_CREATE_SHA224
C
typedef int (*FUNC_SX_HASH_CREATE_SHA224)(struct sxhash *c, size_t csz); #define SX_HASH_CREATE_SHA224 ((FUNC_SX_HASH_CREATE_SHA224)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_HASH_CREATE_SHA224)))
Description
Prepares a SHA224 hash operation context
This function initializes the user allocated object \p c with a new hash 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. remark - SHA224 digest size is 28 bytes
Parameters
Param | Description |
---|---|
c | Hash operation context |
csz | size of the hash operation context |
Returns
SX_OK SX_ERR_INCOMPATIBLE_HW SX_ERR_RETRY