1.57 CRYPT_SHA224_Initialize Function
C
int CRYPT_SHA224_Initialize(
CRYPT_SHA256_CTX* sha224
);Description
This function initializes the internal structures necessary for SHA224 hash calculations.
Preconditions
None.
Parameters
| Parameters | Description |
|---|---|
| sha224 | Pointer to context which saves state between calls |
Returns
- BAD_FUNC_ARG - An invalid pointer was passed to the function
- 0 - An invalid pointer was not passed to the function
Remarks
All SHA hashes have to start at a particular value before adding new data to it. This function sets the necessary values for the structure.
Example
CRYPT_SHA256_CTX sha; uint8_t shaSum[SHA224_DIGEST_SIZE]; CRYPT_SHA224_Initialize(&sha); CRYPT_SHA224_DataAdd(&sha, buffer, sizeof(buffer)); CRYPT_SHA224_Finalize(&sha, shaSum);
