| Copyright | (c) 2024 Auth Global |
|---|---|
| License | Apache2 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Crypto.Sha256.Hkdf
Description
Implementation of HKDF-SHA256 supporting key reuse, backtracking, streaming, and more.
Synopsis
- hkdf :: HmacKeyPlain -> ByteString -> ByteString -> Int -> ByteString
- hkdf' :: HmacKeyPlain -> ByteString -> ByteString -> Int -> HashString
- hkdfList :: HmacKeyPlain -> ByteString -> ByteString -> [ByteString]
- hkdfList' :: HmacKeyPlain -> ByteString -> ByteString -> [HashString]
- hkdfGen :: HmacKeyPlain -> ByteString -> ByteString -> HkdfGen
- hkdfExtract :: HmacKey -> ByteString -> HmacKey
- hkdfExpand :: HmacKey -> ByteString -> Int -> ByteString
- hkdfExpand' :: HmacKey -> ByteString -> Int -> HashString
- hkdfExpandList :: HmacKey -> ByteString -> [ByteString]
- hkdfExpandList' :: HmacKey -> ByteString -> [HashString]
- hkdfExpandGen :: HmacKey -> ByteString -> HkdfGen
- data HkdfCtx
- hkdfCtx_init :: HmacKey -> HkdfCtx
- hkdfCtx_feed :: ByteString -> HkdfCtx -> HkdfCtx
- hkdfCtx_feeds :: Foldable f => f ByteString -> HkdfCtx -> HkdfCtx
- hkdfCtx_update :: HkdfCtx -> ByteString -> HkdfCtx
- hkdfCtx_updates :: Foldable f => HkdfCtx -> f ByteString -> HkdfCtx
- hkdfCtx_finalize :: HkdfCtx -> HmacKey
- data HkdfGen
- hkdfGen_init :: HmacKey -> ShortByteString -> HkdfGen
- hkdfGen_read :: HkdfGen -> (ByteString, HkdfGen)
- hkdfGen_read' :: HkdfGen -> (HashString, HkdfGen)
- hkdfGen_peek :: HkdfGen -> Maybe HashString
Documentation
Arguments
| :: HmacKeyPlain | salt |
| -> ByteString | initial keying material |
| -> ByteString | info tag |
| -> Int | desired output length |
| -> ByteString |
Arguments
| :: HmacKeyPlain | salt |
| -> ByteString | initial keying material |
| -> ByteString | info tag |
| -> Int | desired output length |
| -> HashString |
Arguments
| :: HmacKeyPlain | salt |
| -> ByteString | initial keying material |
| -> ByteString | info tag |
| -> [ByteString] |
Arguments
| :: HmacKeyPlain | salt |
| -> ByteString | initial keying material |
| -> ByteString | info tag |
| -> [HashString] |
Arguments
| :: HmacKeyPlain | salt |
| -> ByteString | initial keying material |
| -> ByteString | info tag |
| -> HkdfGen |
Arguments
| :: HmacKey | salt |
| -> ByteString | initial keying material |
| -> HmacKey | pseudorandom key |
Arguments
| :: HmacKey | pseudorandom key |
| -> ByteString | info tag |
| -> Int | desired length |
| -> ByteString |
Arguments
| :: HmacKey | pseudorandom key |
| -> ByteString | info tag |
| -> Int | desired length |
| -> HashString |
Arguments
| :: HmacKey | pseudorandom key |
| -> ByteString | info tag |
| -> [ByteString] | infinite lazy list of output blocks |
Arguments
| :: HmacKey | pseudorandom key |
| -> ByteString | info tag |
| -> [HashString] | infinite lazy list of output blocks |
Arguments
| :: HmacKey | pseudorandom key |
| -> ByteString | info tag |
| -> HkdfGen |
Context type for incremental hkdfExtract
hkdfCtx_init :: HmacKey -> HkdfCtx Source #
hkdfCtx_feed :: ByteString -> HkdfCtx -> HkdfCtx Source #
hkdfCtx_feeds :: Foldable f => f ByteString -> HkdfCtx -> HkdfCtx Source #
hkdfCtx_update :: HkdfCtx -> ByteString -> HkdfCtx Source #
hkdfCtx_updates :: Foldable f => HkdfCtx -> f ByteString -> HkdfCtx Source #
hkdfCtx_finalize :: HkdfCtx -> HmacKey Source #
hkdfGen_init :: HmacKey -> ShortByteString -> HkdfGen Source #
hkdfGen_read :: HkdfGen -> (ByteString, HkdfGen) Source #
hkdfGen_read' :: HkdfGen -> (HashString, HkdfGen) Source #
hkdfGen_peek :: HkdfGen -> Maybe HashString Source #