Mentalis.org Security Library documentation

HMAC Constructor (HashAlgorithm)

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

[Visual Basic]
Overloads Public Sub New( _
   ByVal hash As HashAlgorithm _
)
[C#]
public HMAC(
   HashAlgorithm hash
);

Parameters

hash
The underlying hash algorithm to use.

Remarks

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

Exceptions

Exception TypeCondition
ArgumentNullExceptionhash is a null reference (Nothing in Visual Basic).

See Also

HMAC Class | HMAC Members | Org.Mentalis.Security.Cryptography Namespace | HMAC Constructor Overload List