System.Security.Cryptography.HMACSHA512 Class

Computes a Hash-based Message Authentication Code (HMAC) using the System.Security.Cryptography.SHA512 hash function.

See Also: HMACSHA512 Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public class HMACSHA512 : HMAC

Remarks

System.Security.Cryptography.HMACSHA512 is a type of keyed hash algorithm that is constructed from the SHA-512 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data and hashes the result. The hash value is mixed with the secret key again, and then hashed a second time. The output hash is 512 bits in length.

An HMAC can be used to determine whether a message sent over a nonsecure channel has been tampered with, provided that the sender and receiver share a secret key. The sender computes the hash value for the original data and sends both the original data and hash value as a single message. The receiver recalculates the hash value on the received message and checks that the computed HMAC matches the transmitted HMAC.

If the original and computed hash values match, the message is authenticated. If they do not match, either the data or the hash value has been changed. HMACs provide security against tampering because knowledge of the secret key is required to change the message and reproduce the correct hash value.

System.Security.Cryptography.HMACSHA512 accepts keys of any size, and produces a hash sequence of length 512 bits.

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0