Redigera

Dela via


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).

public:
 override System::Security::Cryptography::ICryptoTransform ^ CreateDecryptor();
public override System.Security.Cryptography.ICryptoTransform CreateDecryptor ();
override this.CreateDecryptor : unit -> System.Security.Cryptography.ICryptoTransform
Public Overrides Function CreateDecryptor () As ICryptoTransform

Returns

A symmetric decryptor object.

Remarks

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

Applies to

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).

public:
 override System::Security::Cryptography::ICryptoTransform ^ CreateDecryptor(cli::array <System::Byte> ^ rgbKey, cli::array <System::Byte> ^ rgbIV);
public override System.Security.Cryptography.ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[]? rgbIV);
public override System.Security.Cryptography.ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[] rgbIV);
override this.CreateDecryptor : byte[] * byte[] -> System.Security.Cryptography.ICryptoTransform
Public Overrides Function CreateDecryptor (rgbKey As Byte(), rgbIV As Byte()) As ICryptoTransform

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