CSSM_DigestData

Purpose

This function computes a message digest for the supplied data.

Format

CSSM_RETURN CSSMAPI CSSM_DigestData 
               (CSSM_CC_HANDLE CCHandle,
               const CSSM_DATA_PTR DataBufs,
               uint32 DataBufCount,
               CSSM_DATA_PTR Digest)

Parameters

Input
CCHandle
The handle that describes the context of this cryptographic operation used to link to the CSP-managed information.
DataBufs
A pointer to a vector of CSSM_DATA structures that contain the data to be operated on.
DataBufCount
The number of DataBufs.
Output
Digest
A pointer to the CSSM_DATA structure for the message digest.

Return Value

CSSM_OK if the function was successful. CSSM_FAIL if an error occurred. Use CSSM_GetError to determine the exact error.

Notes

The output can be obtained either by filling the caller-supplied buffer or using the application's memory allocation functions to allocate space, which the application must later free. If the output buffer pointer this is NULL, an error code CSSM_CSP_INVALID_DATA_POINTER is returned.

Related Information

CSSM_DigestDataInit
CSSM_DigestDataUpdate
CSSM_DigestDataFinal