Previous section.

Common Security: CDSA and CSSM
Copyright © 1997 The Open Group

NAME

CSSM_QuerySize

SYNOPSIS

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

DESCRIPTION

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.

PARAMETERS

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.

RETURN VALUE

A CSSM return value. This function returns CSSM_OK if successful, and returns an error code if an error has occurred.

ERRORS

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.

SEE ALSO

CSSM_EncryptData, CSSM_EncryptDataUpdate,
CSSM_DecryptData, CSSM_DecryptDataUpdate,
CSSM_SignData, CSSM_VerifyData,
CSSM_DigestData, CSSM_GenerateMac

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.
You should also read the legal notice explaining the terms and conditions relating to the CDSA documentation.

Contents Next section Index