CRYPT_SHA384_DataAdd Function

C

int CRYPT_SHA384_DataAdd(
    CRYPT_SHA384_CTX* sha384, 
    const unsigned char* input, 
    unsigned int sz
);

Description

This function updates the hash with the data provided.

Preconditions

The SHA384 context must be initialized prior to the first call of this function. The context must not be modified by code outside of this function.

Parameters

Parameters Description
sha384 Pointer to CRYPT_SHA384_CTX structure which holds the hash values.
input Pointer to the data to use to update the hash.
sz Size of the data (in bytes) to use to update the hash.

Returns

Remarks

In order to preserve the validity of the SHA384 hash, nothing must modify the context holding variable between calls to CRYPT_SHA384_DataAdd.

Example

CRYPT_SHA384_CTX sha384;
uint8_t buffer[1024];
uint8_t shaSum[SHA384_DIGEST_SIZE];

CRYPT_SHA384_Initialize(&sha384);
CRYPT_SHA384_DataAdd(&sha384, buffer, sizeof(buffer));
CRYPT_SHA384_Finalize(&sha384, shaSum);