Encrypts plaintext data and computes the authentication tag.

Namespace:  Rebex.Security.Cryptography
Assembly:  Rebex.Common (in Rebex.Common.dll)

Syntax

Visual Basic
Public Sub Encrypt ( _
	nonce As Byte(), _
	plaintext As Byte(), _
	ciphertext As Byte(), _
	authTag As Byte(), _
	additionalAuthData As Byte() _
)
C#
public void Encrypt(
	byte[] nonce,
	byte[] plaintext,
	byte[] ciphertext,
	byte[] authTag,
	byte[] additionalAuthData
)

Parameters

nonce
Type: array<System..::..Byte>[]()[][]
The nonce associated with this message, which should be unique for every operation with the same key.
plaintext
Type: array<System..::..Byte>[]()[][]
The data to encrypt.
ciphertext
Type: array<System..::..Byte>[]()[][]
The byte array to store the encrypted data to.
authTag
Type: array<System..::..Byte>[]()[][]
The byte array to store the computed authentication tag to.
additionalAuthData
Type: array<System..::..Byte>[]()[][]
Additional authenticated data (AAD) associated with this message, which must also be provided during decryption.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also