cryptonite-0.30: Cryptography Primitives sink

License | BSD-style
Stability | experimental
Portability | Good
Safe Haskell | None
Language | Haskell2010

Crypto.KDF.BCryptPBKDF

Description

Port of the bcrypt_pbkdf key derivation function from OpenBSD as described at http://man.openbsd.org/bcrypt_pbkdf.3.

Synopsis

- data Parameters = Parameters {
  - iterCounts :: Int
  - outputLength :: Int
  }
- generate :: (ByteArray pass, ByteArray salt, ByteArray output) => Parameters -> pass -> salt -> output
- hashInternal :: (ByteArrayAccess pass, ByteArrayAccess salt, ByteArray output) => pass -> salt -> output

# Documentation

data Parameters Source #

Constructors

Parameters |

Fields

- iterCounts :: Int

  The number of user-defined iterations for the algorithm (must be > 0)

- outputLength :: Int

  The number of bytes to generate out of BCryptPBKDF (must be in 1..1024)

#### Instances

Instances details

Show Parameters Source # |
Instance details Defined in Crypto.KDF.BCryptPBKDF Methods showsPrec :: Int -> Parameters -> ShowS Source # show :: Parameters -> String Source # showList :: [Parameters] -> ShowS Source #
Eq Parameters Source # |
Instance details Defined in Crypto.KDF.BCryptPBKDF Methods (==) :: Parameters -> Parameters -> Bool Source # (/=) :: Parameters -> Parameters -> Bool Source #
Ord Parameters Source # |

Instance details

Defined in Crypto.KDF.BCryptPBKDF

Methods

compare :: Parameters -> Parameters -> Ordering Source #

(<) :: Parameters -> Parameters -> Bool Source #

(<=) :: Parameters -> Parameters -> Bool Source #

(>) :: Parameters -> Parameters -> Bool Source #

(>=) :: Parameters -> Parameters -> Bool Source #

max :: Parameters -> Parameters -> Parameters Source #

min :: Parameters -> Parameters -> Parameters Source #

generate :: (ByteArray pass, ByteArray salt, ByteArray output) => Parameters -> pass -> salt -> output Source #

Derive a key of specified length using the bcrypt_pbkdf algorithm.

hashInternal :: (ByteArrayAccess pass, ByteArrayAccess salt, ByteArray output) => pass -> salt -> output Source #

Internal hash function used by `generate`.

Normal users should not need this.