Aes.LegalKeySizes Property

Definition

Gets the key sizes, in bits, that are supported by the symmetric algorithm.

public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get; }

Property Value

An array that contains the key sizes supported by the algorithm.

Remarks

For AES, the legal key sizes are 128, 192, and 256 bits.

Applies to

Product Versions
.NET Core 1.0, Core 1.1
.NET Standard 1.3, 1.4, 1.6