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


CSSM_QuerySize

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

Purpose

This function queries for the size of the output data for Signature, Message Digest, and Message Authentication Code context types and queries for the algorithm block size, or the size of the output data for encryption and decryption context types. This function also can be used to query the output size requirements for the intermediate steps of a staged cryptographic operation (for example, CSSM_EncryptDataUpdate and CSSM_DecryptDataUpdate). There may be algorithm-specific and token-specific rules restricting the lengths of data in these data update calls.

Format

CSSM_RETURN CSSMAPI CSSM_QuerySize 
              (CSSM_CC_HANDLE CCHandle,
              CSSM_BOOL Encrypt,
              uint32 QuerySizeCount,
              CSSM_QUERY_SIZE_DATA_PTR DataBlock)

Parameters

Input

CCHandle
The handle that describes the context of this cryptographic operation used to link to the CSP-managed information.
Encrypt
When asymmetric and symmetric contexts are being used, Encrypt indicates whether an encryption (CSSM_TRUE) or a decryption (CSSM_FALSE) operation will be performed. For all other operations and context types, Encrypt should be set to CSSM_FALSE.
QuerySizeCount
An integer that indicates the number of data blocks that are in DataBlock.

Input/Output

DataBlock
A pointer to a CSSM_QUERY_SIZE_DATA structure that contains the size of the input and the output data blocks, 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.

Related Information

CSSM_EncryptData
CSSM_EncryptDataUpdate
CSSM_DecryptData
CSSM_DecryptDataUpdate
CSSM_SignData
CSSM_VerifyData
CSSM_DigestData
CSSM_GenerateMac

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014