This documentation is archived and is not being maintained.

KeyedHashAlgorithm.Key Property

Gets or sets the key to be used in the hash algorithm.

[Visual Basic]
Public Overridable Property Key As Byte ()
[C#]
public virtual byte[] Key {get; set;}
[C++]
public: __property virtual unsigned char get_Key();
public: __property virtual void set_Key(unsigned char __gc[]);
[JScript]
public function get Key() : Byte[];
public function set Key(Byte[]);

Property Value

The key to be used in the hash algorithm.

Exceptions

Exception Type Condition
CryptographicException An attempt is made to change Key after hashing has begun.

Remarks

This property is the public accessor for KeyValue.

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

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

Show: