Initializes a new instance of the HMAC class. This class cannot be inherited.

Namespace: LLCryptoLib.Security.Cryptography
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public HMAC(
	HashAlgorithm hash
)
Visual Basic
Public Sub New ( _
	hash As HashAlgorithm _
)
Visual C++
public:
HMAC(
	HashAlgorithm^ hash
)

Parameters

hash
Type: System.Security.Cryptography..::..HashAlgorithm
The underlying hash algorithm to use.

Remarks

A random key will be generated and used by the HMAC.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionhash is a null reference (Nothing in Visual Basic).

See Also