Export (0) Print
Expand All

AesCryptoServiceProvider::CreateDecryptor Method (array<Byte>, array<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)

public:
virtual ICryptoTransform^ CreateDecryptor(
	array<unsigned char>^ key, 
	array<unsigned char>^ iv
) override

Parameters

key
Type: array<System::Byte>

The secret key to use for the symmetric algorithm.

iv
Type: array<System::Byte>

The initialization vector to use for the symmetric algorithm.

Return Value

Type: System.Security.Cryptography::ICryptoTransform
A symmetric AES decryptor object.

ExceptionCondition
ArgumentNullException

key or iv is nullptr.

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

Supported in: 4.6, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft