1.4.4.1 DRV_CRYPTO_HASH_Digest()
HASH_ERROR DRV_CRYPTO_HASH_Digest (void * contextData, HASHCON_MODE mode, uint8_t * data, uint32_t dataLength, uint8_t * digest, uint32_t digestLength)
Execute a single hash operation to generate a digest.
contextData |
A pointer to the context block that contains the hash context data. |
mode |
The HASHCON_MODE mode to use. |
data |
The data to add to the operation. |
dataLength |
The length of the data. |
digest |
Buffer to contain the digest. |
digestLength |
The size of the digest buffer. |
HASH_NO_ERROR on success, HASH_CONTEXT_ERROR / HASH_INITIALIZE_ERROR / HASH_STATE_ERROR / HASH_EXECUTE_ERROR on failure. |
Note:
A hash operation must be in progress (initialized by DRV_HASH_CRYPTO_Initialize()).