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.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
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.