CryptoSys API Library Manual
 
Aead.EncryptWithTag Method (Byte[], Byte[], Byte[], Aead.Algorithm)
 Encrypt data using specified AEAD algorithm in one-off operation. The authentication tag is appended to the output. 
Syntax
[C#]
public static byte[] EncryptWithTag(
	byte[] input,
	byte[] key,
	byte[] iv,
	Aead.Algorithm aeadAlg
)
[VB.NET]
Public Shared Function EncryptWithTag ( _
	input As Byte(), _
	key As Byte(), _
	iv As Byte(), _
	aeadAlg As Aead.Algorithm _
) As Byte()
Parameters
  - input
 
  - Input data to be encrypted.
 
  - key
 
  - Key of exact length for algorithm (16 or 32 bytes).
 
  - iv
 
  - Initialization Vector (IV) (aka nonce) (16 bytes for ASCON-128 else 12 bytes).
 
  - aeadAlg
 
  - Type: Aead.Algorithm
Authenticated encryption algorithm. 
Return Value
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
VB6/C equivalent: AEAD_EncryptWithTag
[Contents] [Index]