Decrypt and authenticate input using specified AEAD algorithm in one-off operation
Namespace: CryptoSysAPIAssembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntaxpublic static byte[] Decrypt(
byte[] input,
byte[] key,
byte[] nonce,
byte[] aad,
byte[] tag,
AeadAlgorithm alg
)
Public Shared Function Decrypt (
input As Byte(),
key As Byte(),
nonce As Byte(),
aad As Byte(),
tag As Byte(),
alg As AeadAlgorithm
) As Byte()
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
ByteDecrypted 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