Cipher.DecryptAEAD Method (Byte[], Byte[], Byte[], AeadAlgorithm)
Decrypt data using the AES-GCM authenticated encryption algorithm.
Syntax
[C#]
public static byte[] DecryptAEAD(
byte[] input,
byte[] key,
byte[] iv,
AeadAlgorithm aeadAlg
)
[VB.NET]
Public Shared Function DecryptAEAD ( _
input As Byte(), _
key As Byte(), _
iv As Byte(), _
aeadAlg As AeadAlgorithm _
) As Byte()
Parameters
- input
- Input data to be decrypted.
- key
- Key of exact length for algorithm (16, 24 or 32 bytes).
- iv
- Initialization Vector (IV) (aka nonce) exactly 12 bytes long.
- aeadAlg
- Type: AeadAlgorithm
Authenticated encryption algorithm.
Return Value
Plaintext in a byte array, or empty array on error (an empty array may also be the correct result - check General.ErrorCode for details).
Remarks
The input must include the 16-byte tag appended to the ciphertext. The output will be exactly 16 bytes shorter than the input. In all cases the IV must be exactly 12 bytes (96 bits) and the tag must be exactly 16 bytes (128 bits).
See Also
VB6/C equivalent: CIPHER_DecryptAEAD
[Contents] [Index]