TripleDESCryptoServiceProvider.CreateDecryptor Method (Byte[], Byte[])

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a symmetric TripleDES decryptor object with the specified key (Key) and initialization vector (IV).

Namespace:   System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

override CreateDecryptor : 
        rgbKey:byte[] *
        rgbIV:byte[] -> ICryptoTransform

Parameters

rgbKey
Type: System.Byte[]

The secret key to use for the symmetric algorithm.

rgbIV
Type: System.Byte[]

The initialization vector to use for the symmetric algorithm.

Return Value

Type: System.Security.Cryptography.ICryptoTransform

A symmetric TripleDES decryptor object.

Exception Condition
CryptographicException

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.

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

The following code example creates a TripleDESCryptoServiceProvider object and uses it to encrypt and decrypt data in a file.

No code example is currently available or this language may not be supported.

The following code example creates a TripleDESCryptoServiceProvider object and uses it to encrypt and decrypt data in memory.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: