CryptoSys API Library Manual

AEAD_FinishEncrypt

Finishes the authenticated encryption (in incremental mode) .

VBA/VB6 Syntax

Public Declare Function AEAD_FinishEncrypt Lib "diCryptoSys.dll" (ByVal hContext As Long, ByRef lpTagOut As Byte, ByVal nTagLen As Long) As Long

nRet = AEAD_FinishEncrypt(hContext, abTagOut(0), nTagLen)

C/C++ Syntax

long __stdcall AEAD_FinishEncrypt(long hContext, unsigned char *lpTagOut, long nTagLen);

Parameters

hContext
[in] handle to the AEAD context set up by an earlier call to AEAD_InitKey.
lpTagOut
[out] byte array of sufficient length to receive the tag (currently 16 bytes for all supported algorithms).
nTagLen
[in] specifying the length in bytes of the tag array.

Returns (VBA/C)

If successful, the return value is zero; otherwise it returns a nonnegative error code.

.NET Equivalent

Aead.FinishEncrypt Method

Remarks

Must be preceded by AEAD_StartEncrypt and zero or more calls to AEAD_Update. May be followed by AEAD_SetNonce to begin processing another packet with the same key and algorithm; otherwise should be followed by AEAD_Destroy . Returns MISUSE_ERROR if called out of sequence.

Example

See the example in AEAD_InitKey.

[Contents] [Index]

[PREV: AEAD_FinishDecrypt...]   [Contents]   [Index]   
   [NEXT: AEAD_InitKey...]

Copyright © 2001-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-01-07T07:42:00Z.