Export (0) Print
Expand All

SymmetricAlgorithm::KeySize Property

Gets or sets the size, in bits, of the secret key used by the symmetric algorithm.

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

public:
virtual property int KeySize {
	int get ();
	void set (int value);
}

Property Value

Type: System::Int32
The size, in bits, of the secret key used by the symmetric algorithm.

ExceptionCondition
CryptographicException

The key size is not valid.

The valid key sizes are specified by the particular symmetric algorithm implementation and are listed in the LegalKeySizes property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft