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 ()
public virtual byte[] Key {get; set;}
public: __property virtual unsigned char get_Key();
public: __property virtual void set_Key(unsigned char __gc[]);
public function get Key() : Byte[];
public function set Key(Byte[]);

Property Value

The key to be used in the hash algorithm.


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


This property is the public accessor for KeyValue.


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