GenerateMac

nn::crypto::AuthenticatedEncryptor::GenerateMac Member Function

Syntax

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

Parameters

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

Return Values

None.

Description

Generates an MAC.

You must call the UpdatePdataFinal function before calling this function. You cannot call this function more than once.

Generates an MAC based on the previously specified Adata and Pdata.

Send the ciphertext or the Adata and Cdata together with the MAC, and compare against the MAC from decrypting to detect whether the Adata and Cdata have been tampered with.

Revision History

2011/10/27
Initial version.

CONFIDENTIAL