CryptoSys PKI Pro Manual

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

Encrypt data using the AES-GCM authenticated encryption algorithm.

Syntax

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

Parameters

input
Input data to be encrypted.
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

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 Method (String, String, String, CipherAlgorithm, Mode, Padding, Cipher.Opts)...]   [Contents]   [Index]   
   [NEXT: Cipher.EncryptAEAD Method (Byte, Byte, Byte, Byte, AeadAlgorithm, Cipher.Opts)...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.