GenerateMac

nn::crypto::AuthenticatedDecryptor::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 UpdateCdataFinal function before calling this function. You cannot call this function more than once.

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

Compare the MAC from this function with the MAC generated when encrypting. If these match, the Adata and Cdata (and their decryption result Pdata) have not been tampered with.

Revision History

2011/10/27
Initial version.

CONFIDENTIAL