DESCryptoServiceProvider.CreateDecryptor Method

Definition

Overloads

CreateDecryptor()

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

CreateDecryptor(Byte[], Byte[])

Creates a symmetric Data Encryption Standard (DES) decryptor object with the specified key (Key) and initialization vector (IV).

CreateDecryptor()

Source:
DESCryptoServiceProvider.Unix.cs
Source:
DESCryptoServiceProvider.Unix.cs
Source:
DESCryptoServiceProvider.Unix.cs

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

C#
public override 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.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1

CreateDecryptor(Byte[], Byte[])

Source:
DESCryptoServiceProvider.Unix.cs
Source:
DESCryptoServiceProvider.Unix.cs
Source:
DESCryptoServiceProvider.Unix.cs

Creates a symmetric Data Encryption Standard (DES) decryptor object with the specified key (Key) and initialization vector (IV).

C#
public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]? rgbIV);
C#
public override 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 DES decryptor object.

Exceptions

The value of the Mode property is OFB.

-or-

The value of the Mode property is CFB and the value of the FeedbackSize property is not 8.

-or-

An invalid key size was used.

-or-

The algorithm key size was not available.

Remarks

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

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 2.0, 2.1