cryptonite-0.28: 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 Source #

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 Source #

PRF for PBKDF2 using HMAC with the hash algorithm as parameter

data Parameters Source #

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 Source #

generate the pbkdf2 key derivation function from the output

fastPBKDF2_SHA1 :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray out) => Parameters -> password -> salt -> out Source #

fastPBKDF2_SHA256 :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray out) => Parameters -> password -> salt -> out Source #

fastPBKDF2_SHA512 :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray out) => Parameters -> password -> salt -> out Source #