1.5.2.9 DRV_CRYPTO_HASH_SHAKE_Initialize()

HASH_ERROR DRV_CRYPTO_HASH_SHAKE_Initialize (void * contextData, HASHCON_MODE mode, uint16_t digestLength)

This function initializes a new hash operation with the specified SHAKE mode.

Parameters:
contextData

A pointer to the context block that contains the hash context data.

mode

The HASHCON_MODE to use.

digestLength

The length of the result SHAKE digest to be generated.

Return values:
HASH_NO_ERROR

Success.

HASH_CONTEXT_ERROR

Invalid or corrupted hash context.

HASH_INVALID_MODE_ERROR

Unsupported or incorrect hash mode.

HASH_INITIALIZE_ERROR

Failure during hash initialization.

Note:

Reinitializing a HASH operation in progress will void the previous operation.