Compartir a través de


AuthenticatedEncryptionProvider.Decrypt Method

Definition

Decrypts ciphertext into plaintext.

public virtual byte[] Decrypt (byte[] ciphertext, byte[] authenticatedData, byte[] iv, byte[] authenticationTag);
abstract member Decrypt : byte[] * byte[] * byte[] * byte[] -> byte[]
override this.Decrypt : byte[] * byte[] * byte[] * byte[] -> byte[]
Public Overridable Function Decrypt (ciphertext As Byte(), authenticatedData As Byte(), iv As Byte(), authenticationTag As Byte()) As Byte()

Parameters

ciphertext
Byte[]

The encrypted text to be decrypted.

authenticatedData
Byte[]

The authenticate data that is used in verification.

iv
Byte[]

The initialization vector used when creating the ciphertext.

authenticationTag
Byte[]

The authentication tag that was created during the encyption.

Returns

Byte[]

The decrypted ciphertext.

Exceptions

Thrown if authenticationTag is null or empty.

Thrown if the AES crypto operation threw. See inner exception for details.

Thrown if the internal SignatureProvider is disposed.

Applies to