CryptoSys API Library Manual

AEAD_SetNonce

Set the nonce (in incremental mode).

VBA/VB6 Syntax

Public Declare Function AEAD_SetNonce Lib "diCryptoSys.dll" (ByVal hContext As Long, ByRef lpNonce As Byte, ByVal nNonceLen As Long) As Long

nRet = AEAD_SetNonce(hContext, abNonce(0), nNonceLen)

C/C++ Syntax

long __stdcall AEAD_SetNonce(long hContext, const unsigned char *lpNonce, long nNonceLen);

Parameters

hContext
[in] handle to the AEAD context set up by an earlier call to AEAD_InitKey.
lpNonce
[in] containing the nonce of exact length for the given algorithm (currently always 12 bytes).
nNonceLen
[in] equal to length of the nonce in bytes.

Returns (VBA/C)

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

.NET Equivalent

Aead.SetNonce Method

Remarks

Must be followed by zero or more calls to AEAD_AddAAD and then either AEAD_StartEncrypt or AEAD_StartDecrypt. Returns MISUSE_ERROR if called out of sequence.

Example

See the example in AEAD_InitKey.

[Contents] [Index]

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

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