Export (0) Print
Expand All

SymmetricAlgorithm.KeySize Property

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

[Visual Basic]
Public Overridable Property KeySize As Integer
[C#]
public virtual int KeySize {get; set;}
[C++]
public: __property virtual int get_KeySize();
public: __property virtual void set_KeySize(int);
[JScript]
public function get KeySize() : int;
public function set KeySize(int);

Property Value

The size of the secret key used by the symmetric algorithm.

Exceptions

Exception Type Condition
CryptographicException The key size is not valid.

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SymmetricAlgorithm Class | SymmetricAlgorithm Members | System.Security.Cryptography Namespace | Cryptographic Services

Show:
© 2014 Microsoft