UpdateFinal

nn::crypto::Encryptor::UpdateFinal Member Function

Syntax

virtual size_t UpdateFinal(
     void * pDst,
     size_t dstSize
) = 0;

Parameters

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

Return Values

Returns the number of bytes written to pDst.

Description

Finalizes encryption.

You must call this function after finishing your series of encryption operations by calls to the Update function.

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

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