UpdatePdataFinal

nn::crypto::AuthenticatedEncryptor::UpdatePdataFinal Member Function

Syntax

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

Parameters

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

Return Values

Returns the number of bytes written to pDst.

Description

Finalizes Pdata specification.

You must call this function after using the UpdatePdata function to finalize Pdata specification, and before calling the GenerateMac function. If there is no Pdata specification, do not call the UpdatePdata function. Instead, just call the UpdatePdataFinal function.

The size of the buffer required for pDst is (the total of all size values specified in the UpdatePdata function calls) - (the total of all UpdatePdata 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, encryption cannot continue. You must then try again, starting by calling the Initialize function.

Revision History

2011/10/27
Initial version.

CONFIDENTIAL