Parent topic:MPLAB® Harmony Crypto Library
int CRYPT_SHA384_Initialize(
CRYPT_SHA384_CTX* sha384
);
This function initializes the internal structures necessary for SHA384 hash calculations.
None.
Parameters | Description |
---|---|
sha384 | Pointer to CRYPT_SHA384_CTX structure which holds the hash values. |
-
BAD_FUNC_ARG - An invalid pointer was passed to the function.
-
0 - An invalid pointer was not passed to the function.
All SHA384 hashes have to start at a particular value before adding new data to it. This function sets the necessary values for the structure.
CRYPT_SHA384_CTX sha384;
uint8_t shaSum[SHA384_DIGEST_SIZE];
CRYPT_SHA384_Initialize(&sha384);
CRYPT_SHA384_DataAdd(&sha384, buffer, sizeof(buffer));
CRYPT_SHA384_Finalize(&sha384, shaSum);