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

 

Creates a symmetric AES decryptor object using the specified key and initialization vector (IV).

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

override CreateDecryptor : 
        key:byte[] *
        iv:byte[] -> ICryptoTransform

Parameters

key
Type: System.Byte[]

The secret key to use for the symmetric algorithm.

iv
Type: System.Byte[]

The initialization vector to use for the symmetric algorithm.

Return Value

Type: System.Security.Cryptography.ICryptoTransform

A symmetric AES decryptor object.

Exception Condition
ArgumentNullException

key or iv is null.

ArgumentException

key is invalid.

The following example shows how to use the AesCryptoServiceProvider.CreateDecryptor method to decrypt an encrypted message. This code example is part of a larger example provided for the AesCryptoServiceProvider class.

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

.NET Framework
Available since 3.5
Return to top
Show: