This documentation is archived and is not being maintained.

KeyedHashAlgorithm Class

Represents the abstract class from which all implementations of keyed hash algorithms must derive.

For a list of all members of this type, see KeyedHashAlgorithm Members.


[Visual Basic]
MustInherit Public Class KeyedHashAlgorithm
   Inherits HashAlgorithm
public abstract class KeyedHashAlgorithm : HashAlgorithm
public __gc __abstract class KeyedHashAlgorithm : public
public abstract class KeyedHashAlgorithm extends HashAlgorithm

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Hash functions map binary strings of an arbitrary length to small binary strings of a fixed length. A cryptographic hash function has the property that it is computationally infeasible to find two distinct inputs that hash to the same value. Small changes to the data result in large unpredictable changes in the hash.

A keyed hash algorithm is a key-dependent, one-way hash function used as a message authentication code. Only someone who knows the key can verify the hash. Keyed hash algorithms provide authenticity without secrecy.

Hash functions are commonly used with digital signatures and for data integrity. HMACSHA1 is an example of a keyed hash algorithm.


Namespace: System.Security.Cryptography

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

Assembly: Mscorlib (in Mscorlib.dll)

See Also

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