Click or drag to resize

AeadMac Method

Compute Message Authentication Code (tag) over input data

Namespace: CryptoSysAPI
Assembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntax
public static byte[] Mac(
	byte[] key,
	byte[] nonce,
	byte[] aad,
	AeadAlgorithm alg
)

Parameters

key  Byte
Key of exact length for given algorithm (16 or 32 bytes).
nonce  Byte
Nonce of exact length for given algorithm (currently always 12 bytes)
aad  Byte
Data to be authenticated
alg  AeadAlgorithm
AEAD algorithm to use

Return Value

Byte
Tag value in byte array, or empty array on error
Remarks
Use General.ErrorCode to find the code of the last error. This is equivalent to Aead.Encrypt with a zero-length plaintext input.
See Also