Pseudo Random Key
Instances2Eq, ByteArrayAccess
Eq (PRK a)Defined in crypton-1.0.4 · Crypto.KDF.HKDFByteArrayAccess (PRK a)Defined in crypton-1.0.4 · Crypto.KDF.HKDF
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulecrypton-1.0.4Haskell2010
Key Derivation Function based on HMAC
See RFC5869
Pseudo Random Key
Eq (PRK a)Defined in crypton-1.0.4 · Crypto.KDF.HKDFByteArrayAccess (PRK a)Defined in crypton-1.0.4 · Crypto.KDF.HKDFextract :: (HashAlgorithm a, ByteArrayAccess salt, ByteArrayAccess ikm)=> saltSalt
-> ikmInput Keying Material
-> PRK aPseudo random key
Extract a Pseudo Random Key using the parameter and the underlaying hash mechanism
Create a PRK directly from the input key material.
Only use when guaranteed to have a good quality and random data to use directly as key. This effectively skip a HMAC with key=salt and data=key.
expand :: (HashAlgorithm a, ByteArrayAccess info, ByteArray out)=> PRK aPseudo Random Key
-> infoOptional context and application specific information
-> IntOutput length in bytes
-> outOutput data
Expand key material of specific length out of the parameters