AesCryptoServiceProvider.Key Property

 
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.

Gets or sets the symmetric key that is used for encryption and decryption.

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

public override byte[] Key { get; set; }

Property Value

Type: System.Byte[]

The symmetric key that is used for encryption and decryption.

Exception Condition
ArgumentNullException

The value for the key is null.

CryptographicException

The size of the key is invalid.

.NET Framework
Available since 3.5
Return to top
Show: