Represent an HMAC that is a phantom type with the hash used to produce the mac.
The Eq instance is constant time.
Constructors
HMAChmacGetDigest :: Digest a
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
Modulecryptohash-0.11.9Haskell98
Crypto hash generic MAC (Message Authentification Code) module
Represent an HMAC that is a phantom type with the hash used to produce the mac.
The Eq instance is constant time.
HMAChmacGetDigest :: Digest acompute a MAC using the supplied hashing function
hmacAlg :: HashAlgorithm a=> athe hash algorithm the actual value is unused.
-> ByteStringSecret key
-> ByteStringMessage to MAC
-> HMAC acompute a HMAC using a specified algorithm
Represent an ongoing HMAC state, that can be appended with hmacUpdate and finalize to an HMAC with hmacFinalize
Initialize a new incremental HMAC context
hmacInitAlg :: HashAlgorithm a=> athe hash algorithm the actual value is unused.
-> ByteStringSecret key
-> HMACContext aInitialize a new incremental HMAC context with a given hash algorithm.
Incrementally update a HMAC context
Finalize a HMAC context and return the HMAC.