1.5.2.2 DRV_CRYPTO_HASH_Final()

HASH_ERROR DRV_CRYPTO_HASH_Final (void * contextData, const uint8_t * digest, uint32_t digestLength)

This function finalizes the hash operation and generates the digest.

Parameters:
contextData

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

digest

Buffer to contain the digest.

digestLength

The size of the digest buffer.

Return values:
HASH_NO_ERROR

Success.

HASH_CONTEXT_ERROR

Invalid or corrupted hash context.

HASH_INITIALIZE_ERROR

Failure during hash initialization.

HASH_STATE_ERROR

Invalid or unexpected hash state.

HASH_EXECUTE_ERROR

Failure during hash execution.

Note:

A hash operation must be in progress (initialized by DRV_HASH_CRYPTO_Initialize()).