Data.Digest.BCrypt
- bcrypt :: ByteString -> BSalt -> ByteString
- genSalt :: Monad m => Integer -> ByteString -> m BSalt
- data BSalt
- unBSalt :: BSalt -> ByteString
Documentation
Arguments
| :: ByteString | Data to hash |
| -> BSalt | salt generated by genSalt |
| -> ByteString |
Hash a password based on a BSalt with a given cost
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
unBSalt :: BSalt -> ByteStringSource
Deconstruct a BSalt to a bytestring