Previous section.

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

NAME

CSP_DigestDataClone

SYNOPSIS

CSSM_CC_HANDLE CSSMSPI CSP_DigestDataClone
    (CSSM_CSP_HANDLE CSPHandle,
    CSSM_CC_HANDLE oldCCHandle,
    CSSM_CC_HANDLE newCCHandle)

DESCRIPTION

This function clones a given staged message digest context with its cryptographic attributes and intermediate result.

PARAMETERS

CSPHandle (input)

The handle that describes the add-in cryptographic service provider module used to perform up-calls to CSSM for the memory functions managed by CSSM.

oldCCHandle (input)

The old handle that describes the context of a staged message digest operation.

newCCHandle (output)

The new handle that describes the cloned context of a staged message digest operation.

RETURN VALUE

The pointer to a user-allocated CSSM_CC_HANDLE for holding the cloned context handle return from CSSM. If the pointer is NULL, an error has occurred; use CSSM_GetError to obtain the error code.

ERRORS

CSSM_CSP_INVALID_CSP_HANDLE

Invalid CSP handle.

CSSM_CSP_INVALID_CONTEXT_HANDLE

Invalid context handle.

CSSM_CSP_MEMORY_ERROR

Not enough memory to allocate.

CSSM_CSP_STAGED_OPERATION_UNSUPPORTED

Staged operation unsupported.

CSSM_CSP_STAGED_OPERATION_FAILED

Staged Cryptographic operation failed.

CSSM_CSP_GET_STAGED_INFO_ERROR

Cannot find or get the staged information.

Comments

When a digest context is cloned, a new context is created with data associated with the parent context. Changes made to the parent context after calling this function will not be reflected in the cloned context. The cloned context could be used with the CSP_DigestDataUpdate and CSP_DigestDataFinal functions.

SEE ALSO

CSP_DigestData, CSP_DigestDataInit,
CSP_DigestDataUpdate, CSP_DigestDataFinal

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