cryptonite-0.21: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.KDF.PBKDF2

Description

Password Based Key Derivation Function 2

Synopsis

Documentation

type PRF password #

Arguments

 = password

the password parameters

-> Bytes

the content

-> Bytes

prf(password,content)

The PRF used for PBKDF2

prfHMAC :: (HashAlgorithm a, ByteArrayAccess password) => a -> PRF password #

PRF for PBKDF2 using HMAC with the hash algorithm as parameter

data Parameters #

Parameters for PBKDF2

Constructors

Parameters 

Fields

  • iterCounts :: Int

    the number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000.

  • outputLength :: Int

    the number of bytes to generate out of PBKDF2

generate :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray ba) => PRF password -> Parameters -> password -> salt -> ba #

generate the pbkdf2 key derivation function from the output