Computes a Hash-based Message Authentication Code (HMAC) for the input data using the specified hash function.

Namespace:  Rebex.Security.Cryptography
Assembly:  Rebex.Common (in Rebex.Common.dll)

Syntax

Visual Basic
Public Class HMAC _
	Inherits KeyedHashAlgorithm _
	Implements IHashTransform, IDisposable
C#
public class HMAC : KeyedHashAlgorithm, IHashTransform, IDisposable

Remarks

HMAC is defined by RFC 2104 and look like this: alg(K XOR opad + alg(K XOR ipad + text))
where alg is the base hash algorithm,
K is an n byte key,
ipad is the byte 0x36 repeated 64 times (or 128 times),
opad is the byte 0x5c repeated 64 times (or 128 times),
and text is the data being protected.

Inheritance Hierarchy

System..::..Object
  System.Security.Cryptography..::..HashAlgorithm
    Rebex.Security.Cryptography..::..KeyedHashAlgorithm
      Rebex.Security.Cryptography..::..HMAC

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also