Click or drag to resize

AeadEncryptWithTag(Byte, Byte, Byte, AeadAlgorithm) Method

Encrypt data using specified AEAD algorithm in one-off operation. The authentication tag is appended to the output.

Namespace: CryptoSysAPI
Assembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntax
public static byte[] EncryptWithTag(
	byte[] input,
	byte[] key,
	byte[] iv,
	AeadAlgorithm aeadAlg
)

Parameters

input  Byte
Input data to be encrypted.
key  Byte
Key of exact length for algorithm (16 or 32 bytes).
iv  Byte
Initialization Vector (IV) (aka nonce) (16 bytes for ASCON-128 else 12 bytes).
aeadAlg  AeadAlgorithm
Authenticated encryption algorithm.

Return Value

Byte
Ciphertext with tag appended in a byte array, or empty array on error.
Remarks
The output will be exactly 16 bytes longer than the input.
See Also