Click or drag to resize

AeadDecrypt Method

Decrypt and authenticate input using specified AEAD algorithm in one-off operation

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

Parameters

input  Byte
Cipher text input data (required)
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
Additional authentication data (optional). Pass null/Nothing to ignore.
tag  Byte
Tag value (required)
alg  AeadAlgorithm
AEAD algorithm to use

Return Value

Byte
Decrypted plaintext in byte array, or empty array on error
Remarks
Use General.ErrorCode to find the code of the last error. The plaintext is always the same length as the ciphertext. The tag must be input separately.
See Also