Initializes a new instance of the HMAC class.

Namespace:  Classless.Hasher.Mac
Assembly:  Classless.Hasher (in Classless.Hasher.dll) Version: 0.8.3649.33599

Syntax

C#
public Hmac(
	BlockHashAlgorithm hashAlgorithm,
	byte[] key
)
Visual Basic (Declaration)
Public Sub New ( _
	hashAlgorithm As BlockHashAlgorithm, _
	key As Byte() _
)
Visual C++
public:
Hmac(
	BlockHashAlgorithm^ hashAlgorithm, 
	array<unsigned char>^ key
)

Parameters

hashAlgorithm
Type: Classless.Hasher..::.BlockHashAlgorithm
The base hash algorithm to use.
key
Type: array< System..::.Byte >[]()[]
The key to use for the HMAC.

Remarks

If the specified key is null, a random key will be generated and used.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionWhen the specified HashAlgorithm is null.

See Also