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 消息进行解密。

另请参阅

适用于