UpdateCdataFinal

nn::crypto::AuthenticatedDecryptor::UpdateCdataFinal Member Function

Syntax

virtual size_t UpdateCdataFinal(
     void * pDst,
     size_t size
) = 0;

Parameters

Name Description
out pDst Pointer to the buffer storing the decryption results.
in size Size of the buffer specified by pDst.

Return Values

Returns the number of bytes written to pDst.

Description

Finalizes Cdata specification.

You must call this function after using the UpdateCdata function to finalize Cdata specification, and before calling the GenerateMac function.

If there is no Cdata specification , do not call the UpdateCdata function. Instead, just call the UpdateCdataFinal function.

The size of the buffer required for pDst is (the total of all size values specified in the UpdateCdata function calls) - (the total of all UpdateCdata function return values).

The function fails and displays an error if the size of the return value is larger than the buffer size specified in dstSize. Data is not written to the buffer beyond the size specified in dstSize. If the size of the return value is not larger than dstSize, the function indicates a successful completion and writes the size of the return value in pDst.

If this function fails, decryption cannot continue. You must then try again, starting by calling the Initialize function.

Revision History

2011/10/27
Initial version.

CONFIDENTIAL