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


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 Rijndael decryptor object with the specified Key and initialization vector (IV).

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

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


Type: System.Byte[]

The secret key to be used for the symmetric algorithm. The key size must be 128, 192, or 256 bits.

Type: System.Byte[]

The IV to be used for the symmetric algorithm.

Return Value

Type: System.Security.Cryptography.ICryptoTransform

A symmetric Rijndael decryptor object.

Exception Condition

The rgbKey parameter is null.


The rgbIV parameter is null.


The value of the Mode property is not ECB, CBC, or CFB.

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

The rgbkey size must be 128, 192, or 256 bits.

The following code example demonstrates how to use the CreateDecryptor method to decrypt messages encoded with the same signature parameter.

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

.NET Framework
Available since 1.1
Return to top