haskell-bcrypt-0.3.2: A bcrypt implementation for haskell

Safe HaskellNone
LanguageHaskell98

Data.Digest.BCrypt

Synopsis

Documentation

bcrypt Source

Arguments

:: ByteString

Data to hash

-> BSalt

salt generated by genSalt

-> ByteString 

Hash a password based on a BSalt with a given cost

genSalt Source

Arguments

:: Integer

Compute cost

-> ByteString

16 byte secure random seed

-> Maybe BSalt

Returned salt or Nothing

Given a cost from 4-32 and a random seed of 16 bytes generate a salt. Seed should be 16 bytes from a secure random generator

packBSalt Source

Arguments

:: ByteString

Bytestring version of a BSalt

-> Maybe BSalt

BSalt if the salt string validated

Given a bytestring, construct a BSalt type, with some minimal checking

data BSalt Source

BCrypt salt for passing to bcrypt.