Table of Contents

Delegate HmacFactory

Namespace
CryptoHives.Foundation.Security.Cryptography.Kdf
Assembly
CryptoHives.Foundation.Security.Cryptography.dll

A factory that creates an IMac instance keyed with the specified key.

public delegate IMac HmacFactory(byte[] key)

Parameters

key byte[]

The key bytes to use for the MAC.

Returns

IMac

A new IMac instance keyed with key.

Remarks

Used by Hkdf to create HMAC instances with different keys during the Extract and Expand phases of key derivation.

// Example: create a factory for HMAC-SHA-256
HmacFactory sha256Factory = key => new HmacSha256(key);