CRMHASHALG_SHA1 Macro

C

#define CRMHASHALG_SHA1        ((const struct crmhashalg *)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRMHASHALG_SHA1)))

Description

Hash algorithm SHA-1 (Secure Hash Algorithm 1)

Deprecated algorithm. NIST formally deprecated use of SHA-1 in 2011 and disallowed its use for digital signatures in 2013. SHA-3 or SHA-2 are recommended instead.

CRM_HASH_CREATE_SHA1

C

typedef int (*FUNC_CRM_HASH_CREATE_SHA1)(struct crmhash *c, size_t csz);
#define CRM_HASH_CREATE_SHA1                            ((FUNC_CRM_HASH_CREATE_SHA1)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRM_HASH_CREATE_SHA1)))

Description

Prepares a SHA1 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 - SHA1 digest size is 20 bytes

Parameters

ParamDescription
cHash operation context
cszsize of the hash operation context

Returns

CRM_OK CRM_ERR_INCOMPATIBLE_HW CRM_ERR_RETRY