CSSM_EncryptDataUpdate
Purpose
This function updates the staged encrypt operation. The CSSM_QuerySize function can be used to estimate the output buffer size required for each update call. There may be algorithm-specific and token-specific rules restricting the lengths of data in CSSM_EncryptDataUpdate calls. When working with U.S. exportable versions of the OCSF, the caller may be required to possess specific exemptions or privileges in order to allow this call to complete successfully.
Format
CSSM_RETURN CSSMAPI CSSM_EncryptDataUpdate
(CSSM_CC_HANDLE CCHandle,
const CSSM_DATA_PTR ClearBufs,
uint32 ClearBufCount,
CSSM_DATA_PTR CipherBufs,
uint32 CipherBufCount,
uint32 *bytesEncrypted)Parameters
- CCHandle
- The handle that describes the context of this cryptographic operation used to link to the CSP-managed information.
- ClearBufs
- A pointer to a vector of CSSM_DATA structures that contain the data to be operated on.
- ClearBufCount
- The number of ClearBufs.
- CipherBufCount
- The number of CipherBufs.
- CipherBufs
- A pointer to a vector of CSSM_DATA structures that contain the encrypted data resulting from the encryption operation.
- bytesEncrypted
- The size of the encrypted data in bytes.
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 is NULL, an error code CSSM_CSP_INVALID_DATA_POINTER is returned. In-place encryption can be done by supplying the same input and output buffers.
Related Information
CSSM_EncryptDataInit
CSSM_EncryptDataFinal
CSSM_QuerySize
CSSMRequestCssmExemption