DESCryptoServiceProvider.CreateDecryptor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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()
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[])
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈