CSSM_QuerySize
CSSM_RETURN CSSMAPI CSSM_QuerySize
(CSSM_CC_HANDLE CCHandle,
CSSM_BOOL Encrypt,
uint32 QuerySizeCount,
CSSM_QUERY_SIZE_DATA_PTR DataBlockSizes)
This function queries for the size of the output data for encryption and decryption context types. This function can also be used to query the output size requirements for the intermediate steps of a staged cryptographic operation. There may be algorithm-specific and token-specific rules restricting the lengths of data following data update calls.
- CCHandle (input)
The handle for an encryption and decryption context.
- Encrypt (input)
A boolean indicating whether encryption is the operation for which the output data size should be calculated. If CSSM_TRUE, the operation is encryption. If CSM_FALSE the operation is decryption.
- QuerySizeCount (input)
The number of entries in the array of DataBlockSizes.
- DataBlockSizes (input/output)
An array of data block input sizes and corresponding entries for the data block output sizes that are returned by this function.
A CSSM return value. This function returns CSSM_OK if successful, and returns an error code if an error has occurred.
- CSSM__CSP_INVALID_CONTEXT_HANDLE
Invalid context handle.
- CSSM__CSP_INVALID_CONTEXT
Context type and operation do not match.
- CSSM__CSP_INVALID_POINTER
Invalid output query size data pointer.
- CSSM__CSP_INVALID_ALGORITHM
Unknown algorithm.
- CSSM__CSP_OPERATION_UNSUPPORTED
Query size service not supported.
- CSSM__CSP_OPERATION_FAILED
Query size operation failed.
- CSSM__CSP_INVALID_PADDING
Unknown padding.
- CSSM__CSP_INVALID_MODE
Unknown algorithm mode for symmetric context.
- CSSM__CSP_INVALID_ATTR_PASSPHRASE
Invalid or missing passphrase attribute in the asymmetric context.
- CSSM__CSP_QUERY_SIZE_UNKNOWN
Cannot determine size of output data blocks.
CSSM_EncryptData, CSSM_EncryptDataUpdate, CSSM_DecryptData, CSSM_DecryptDataUpdate, CSSM_SignData, CSSM_VerifyData, CSSM_DigestData, CSSM_GenerateMac
Contents | Next section | Index |