commit 9260399d5404ea824d5604dbfa8fdd95029caedb
parent ad783e1fedb72818e5651cfe90cf8cdbb9148e68
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 11 Jan 2025 15:03:26 +0400
lib: haddock improvements
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/Crypto/KDF/HMAC.hs b/lib/Crypto/KDF/HMAC.hs
@@ -12,9 +12,11 @@
-- [RFC5869](https://datatracker.ietf.org/doc/html/rfc5869).
module Crypto.KDF.HMAC (
+ -- * HMAC synonym
+ HMAC
+
-- * HMAC-based KDF
- derive
- , HMAC
+ , derive
-- internals
, extract
@@ -40,6 +42,8 @@ fi = fromIntegral
-- >>> import qualified Crypto.Hash.SHA256 as SHA256
-- >>> :t SHA256.hmac
-- SHA256.hmac :: BS.ByteString -> BS.ByteString -> BS.ByteString
+-- >>> SHA256.hmac "my HMAC key" "my HMAC input"
+-- <256-bit MAC>
type HMAC = BS.ByteString -> BS.ByteString -> BS.ByteString
-- HMAC function and its associated outlength