Table of Contents

Class HMACSHA256Hasher

Namespace
SEBT.Portal.Infrastructure.Services
Assembly
SEBT.Portal.Infrastructure.dll

HMAC-SHA256 implementation of IHMACSHA256Hasher backed by SecretKey. Produces a lowercase hex-encoded 64-character hash of the input string. This is the underlying primitive used by state connectors that need a deterministic, keyed hash without the normalization layer of IdentifierHasher.

public class HMACSHA256Hasher : IHMACSHA256Hasher
Inheritance
object
HMACSHA256Hasher
Implements

Constructors

HMACSHA256Hasher(IOptions<IdentifierHasherSettings>)

public HMACSHA256Hasher(IOptions<IdentifierHasherSettings> options)

Parameters

options IOptions<IdentifierHasherSettings>

Methods

Hash(string)

Computes HMAC-SHA256 over the UTF-8 bytes of input using the implementation's configured secret key. Returns the result as a 64-character lowercase hexadecimal string. Throws if input is null.

public string Hash(string input)

Parameters

input string

Returns

string