共用方式為


DESCryptoServiceProvider.CreateDecryptor 方法

定義

多載

CreateDecryptor()

使用目前的 Key 屬性和初始化向量 (IV),建立對稱解密子物件。

CreateDecryptor(Byte[], Byte[])

使用指定的金鑰 (DES) 和初始化向量 (Key),建立對稱資料加密標準 (IV) 解密子物件。

CreateDecryptor()

使用目前的 Key 屬性和初始化向量 (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

傳回

ICryptoTransform

對稱解密子物件。

備註

這個方法會解密使用具有相同簽章的多載所建立的加密訊息 CreateEncryptor

適用於

CreateDecryptor(Byte[], Byte[])

使用指定的金鑰 (DES) 和初始化向量 (Key),建立對稱資料加密標準 (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

參數

rgbKey
Byte[]

對稱演算法所用的祕密金鑰。

rgbIV
Byte[]

對稱演算法所用的初始化向量。

傳回

ICryptoTransform

對稱 DES 解密子物件。

例外狀況

Mode 屬性的值是 OFB

-或- Mode 屬性的值是 CFB,而 FeedbackSize 屬性的值不是 8。

-或- 所使用的金鑰大小無效。

-或- 演算法的金鑰大小無法使用。

備註

這個方法會解密使用具有相同參數的多載所建立的加密訊息 CreateEncryptor

另請參閱

適用於