z/OS Open Cryptographic Services Facility Application Programming
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


CSSM_DecryptData

z/OS Open Cryptographic Services Facility Application Programming
SC24-5899-01

Purpose

This function decrypts the supplied encrypted data. The CSSM_QuerySize function can be used to estimate the output buffer size required. 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_DecryptData                                   
               (const CSSM_CC_HANDLE CCHandle,
               const CSSM_DATA_PTR CipherBufs,
               uint32 CipherBufCount,
               CSSM_DATA_PTR ClearBufs,
               uint32 ClearBufCount,
               uint32 *bytesDecrypted,
               CSSM_DATA_PTR RemData)

Parameters

Input

CCHandle
The handle that describes the context of this cryptographic operation used to link to the CSP-managed information.
CipherBufs
A pointer to a vector of CSSM_DATA structures that contain the data to be operated on.
CipherBufCount
The number of CipherBufs.
ClearBufCount
The number of ClearBufs.

Output

ClearBufs
A pointer to a vector of CSSM_DATA structures that contain the decrypted data resulting from the decryption operation.
BytesDecrypted
The size of the decrypted data in bytes.
RemData
A pointer to the CSSM_DATA structure for the last decrypted block.

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; the application has to free the memory in this case. If the output buffer pointer is NULL, an error code CSSM_CSP_INVALID_DATA_POINTER is returned. In-place decryption can be done by supplying the same input and output buffer.

Related Information

CSSM_QuerySize
CSSM_EncryptData
CSSM_DecryptDataInit
CSSM_DecryptDataUpdate
CSSM_DecryptDataFinal
CSSM_RequestCssmExemption
CSSM_DecryptDataFinal

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014