CryptoSys PKI Pro Manual

Cipher.EncryptAEAD(Byte[], Byte[], Byte[], AeadAlgorithm) Method

Encrypt data using the AES-GCM authenticated encryption algorithm.

Syntax

[C#]
public static byte[] EncryptAEAD(
   byte[] input,
   byte[] key,
   byte[] iv,
   AeadAlgorithm aeadAlg 
)
[VB]
Public Shared Function EncryptAEAD (
   input As Byte(),
   key As Byte(),
   iv As Byte(),
   aeadAlg As AeadAlgorithm 
) As Byte()

Parameters

input  Byte
Input data to be encrypted.
key  Byte
Key of exact length for algorithm (16, 24 or 32 bytes).
iv  Byte
Initialization Vector (IV) (aka nonce) exactly 12 bytes long.
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

VB6/C equivalent: CIPHER_EncryptAEAD

[Contents] [Index]

[PREV: Cipher.Encrypt(String, String, String, CipherAlgorithm, Mode, Padding, Cipher.Opts) Method...]   [Contents]   [Index]   
   [NEXT: Cipher.EncryptAEAD(Byte, Byte, Byte, Byte, AeadAlgorithm, Cipher.Opts) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.