pbkdf-1.1.0.1: Haskell implementation of the PBKDF functions from RFC-2898.

Safe HaskellNone

Crypto.PBKDF.Core

Synopsis

Documentation

sha1PBKDF :: String -> String -> Int -> Int -> PBKDFSource

SHA-1 generator

sha256PBKDF :: String -> String -> Int -> Int -> PBKDFSource

SHA-256 generator

sha512PBKDF :: String -> String -> Int -> Int -> PBKDFSource

SHA-512 generator

pbkdf :: PRF -> String -> String -> Int -> Int -> PBKDFSource

construct a PBKDF generator from a HMAC function

data PBKDF Source

PBKDF generator parameters

Constructors

PBKDF 

Fields

pbkdf_PRF :: PRF

the psuedo-random (i.e., HMAC) function

pbkdf_P :: ByteString

the password (will be UTF-8 encoded)

pbkdf_S :: ByteString

the salt (will be UTF-8 encoded)

pbkdf_c :: Int

iteration count for applying the HMAC

pbkdf_dkLen :: Int

the length of the o/p derived key

data PRF Source

the HMAC function and its underlying HASH function

Constructors

PRF 

Fields

prf_hmac :: ByteString -> ByteString -> ByteString

the PR/HMAC function

prf_hash :: ByteString -> ByteString

the underlying hash function

prf_hLen :: Int

number of octets in o/p hash

pbkdf1 :: PBKDF -> ByteStringSource

the pbkdf1_ core function

pbkdf2 :: PBKDF -> ByteStringSource

the pbkdf2_ core function