-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell implementation of the PBKDF functions from RFC-2898.
--   
--   The Password Based Key Derivation Functions described in RFC-2898 with
--   a test suite to verify that it works with the test vectors published
--   in RFC6070.
@package pbkdf
@version 1.1.1.1

module Crypto.PBKDF.Core

-- | make a SHA-1 parameter blocks (String edition)
sha1PBKDF :: String -> String -> Int -> Int -> PBKDF

-- | make a SHA-1 parameter blocks (ByteString edition)
sha1PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF

-- | make a SHA-256 parameter blocks (String edition)
sha256PBKDF :: String -> String -> Int -> Int -> PBKDF

-- | make a SHA-256 parameter blocks (ByteString edition)
sha256PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF

-- | make a SHA-512 parameter blocks (String edition)
sha512PBKDF :: String -> String -> Int -> Int -> PBKDF

-- | make a SHA-512 parameter blocks (ByteString edition)
sha512PBKDF' :: ByteString -> ByteString -> Int -> Int -> PBKDF

-- | construct a PBKDF parameter block for the key generators (String
--   edition)
pbkdf :: PRF -> String -> String -> Int -> Int -> PBKDF

-- | the parameter block for the key generators
data PBKDF
PBKDF :: PRF -> ByteString -> ByteString -> Int -> Int -> PBKDF

-- | the psuedo-random (i.e., HMAC) function
[pbkdf_PRF] :: PBKDF -> PRF

-- | the password (will be UTF-8 encoded)
[pbkdf_P] :: PBKDF -> ByteString

-- | the salt (will be UTF-8 encoded)
[pbkdf_S] :: PBKDF -> ByteString

-- | iteration count for applying the HMAC
[pbkdf_c] :: PBKDF -> Int

-- | the length of the o/p derived key
[pbkdf_dkLen] :: PBKDF -> Int

-- | contains the HMAC function and its underlying HASH function, along
--   with the size of the hashes it generates
data PRF
PRF :: (ByteString -> ByteString -> ByteString) -> (ByteString -> ByteString) -> Int -> PRF

-- | the PR/HMAC function
[prf_hmac] :: PRF -> ByteString -> ByteString -> ByteString

-- | the underlying hash function
[prf_hash] :: PRF -> ByteString -> ByteString

-- | number of octets in o/p hash
[prf_hLen] :: PRF -> Int

-- | the pbkdf1 key derivation function
pbkdf1 :: PBKDF -> ByteString

-- | the pbkdf2 key derivation function
pbkdf2 :: PBKDF -> ByteString

module Crypto.PBKDF.ByteString
sha1PBKDF1 :: ByteString -> ByteString -> Int -> ByteString
sha256PBKDF1 :: ByteString -> ByteString -> Int -> ByteString
sha512PBKDF1 :: ByteString -> ByteString -> Int -> ByteString
sha1PBKDF2 :: ByteString -> ByteString -> Int -> Int -> ByteString
sha256PBKDF2 :: ByteString -> ByteString -> Int -> Int -> ByteString
sha512PBKDF2 :: ByteString -> ByteString -> Int -> Int -> ByteString

module Crypto.PBKDF
sha1PBKDF1 :: String -> String -> Int -> String
sha256PBKDF1 :: String -> String -> Int -> String
sha512PBKDF1 :: String -> String -> Int -> String
sha1PBKDF2 :: String -> String -> Int -> Int -> String
sha256PBKDF2 :: String -> String -> Int -> Int -> String
sha512PBKDF2 :: String -> String -> Int -> Int -> String
