haskell-bcrypt-0.1: A bcrypt implementation for haskell

Data.Digest.BCrypt

Synopsis

Documentation

bcryptSource

Arguments

:: ByteString

Data to hash

-> BSalt

salt generated by genSalt

-> ByteString 

Hash a password based on a BSalt with a given cost

genSaltSource

Arguments

:: Monad m 
=> Integer

Compute cost

-> ByteString

16 byte secure random seed

-> m BSalt

Monadic for controlling any error conditions

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

data BSalt Source

BCrypt salt for passing to bcrypt.

Instances

unBSalt :: BSalt -> ByteStringSource

Deconstruct a BSalt to a bytestring