Click or drag to resize

AeadInitKey Method

Initializes the context with the key and algorithm ready for repeated incremental operations

Namespace: CryptoSysAPI
Assembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntax
public int InitKey(
	byte[] key,
	AeadAlgorithm alg
)

Parameters

key  Byte
Key of exact length for given algorithm (16 or 32 bytes).
alg  AeadAlgorithm
AEAD algorithm to use

Return Value

Int32
Zero (0) if successful; otherwise it returns a nonzero error code
Remarks
Must be followed by SetNonce(). Can be called at any time to cancel any previous incremental settings.
Example
C#
Aead o = Aead.Instance();
o.InitKey(key, alg);
o.SetNonce(nonce);
//...
o.Dispose();
See Also