SecurityServices for .NET 2.0 Documentation

HMAC Constructor (HashAlgorithm, Byte[])

[This is preliminary documentation and subject to change.]

Initializes a new instance of the HMAC class.

public HMAC(
   HashAlgorithm hash,
   Byte[] rgbKey
);

Parameters

HashAlgorithm
The underlying hash algorithm to use.
Byte[]
The key to use for the HMAC -or- a null reference (Nothing in Visual Basic).

Remarks

If rgbKey is a null reference, the HMAC class will generate a random key.

Exceptions

Exception Type Condition
ArgumentNullException hash is a null reference (Nothing in Visual Basic).

See Also

HMAC Class | Org.Mentalis.SecurityServices.Cryptography Namespace | HMAC Constructor Overload List