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

Safe HaskellNone
LanguageHaskell2010

Crypto.PBKDF.Core

Synopsis

Documentation

sha1PBKDF :: String -> String -> Int -> Int -> PBKDF Source

make a SHA-1 parameter blocks (String edition)

sha1PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF Source

make a SHA-1 parameter blocks (ByteString edition)

sha256PBKDF :: String -> String -> Int -> Int -> PBKDF Source

make a SHA-256 parameter blocks (String edition)

sha256PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF Source

make a SHA-256 parameter blocks (ByteString edition)

sha512PBKDF :: String -> String -> Int -> Int -> PBKDF Source

make a SHA-512 parameter blocks (String edition)

sha512PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF Source

make a SHA-512 parameter blocks (ByteString edition)

pbkdf :: PRF -> String -> String -> Int -> Int -> PBKDF Source

construct a PBKDF parameter block for the key generators (String edition)

data PBKDF Source

the parameter block for the key generators

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

contains the HMAC function and its underlying HASH function, along with the size of the hashes it generates

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

the pbkdf1 key derivation function

pbkdf2 :: PBKDF -> ByteString Source

the pbkdf2 key derivation function