DESCryptoServiceProvider.CreateDecryptor Method
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.
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). |
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
.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 |
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
.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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: