SymmetricAlgorithm.CreateDecryptor Method

Definition

Creates a symmetric decryptor object.

Overloads

CreateDecryptor()

Creates a symmetric decryptor object with the current Key property and initialization vector (IV).

CreateDecryptor(Byte[], Byte[])

When overridden in a derived class, creates a symmetric decryptor object with the specified Key property and initialization vector (IV).

CreateDecryptor()

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Creates a symmetric decryptor object with the current Key property and initialization vector (IV).

C#
public virtual System.Security.Cryptography.ICryptoTransform CreateDecryptor();

Returns

A symmetric decryptor object.

Remarks

This method decrypts an encrypted message created using the CreateEncryptor overload with the same signature.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1

CreateDecryptor(Byte[], Byte[])

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

When overridden in a derived class, creates a symmetric decryptor object with the specified Key property and initialization vector (IV).

C#
public abstract System.Security.Cryptography.ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]? rgbIV);
C#
public abstract System.Security.Cryptography.ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV);

Parameters

rgbKey
Byte[]

The secret key to use for the symmetric algorithm.

rgbIV
Byte[]

The initialization vector to use for the symmetric algorithm.

Returns

A symmetric decryptor object.

Remarks

This method decrypts an encrypted message created using the CreateEncryptor overload with the same parameters.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1