| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Data.Digest.BCrypt
- bcrypt :: ByteString -> BSalt -> ByteString
- genSalt :: Integer -> ByteString -> Maybe BSalt
- packBSalt :: ByteString -> Maybe BSalt
- data BSalt
Documentation
Arguments
| :: ByteString | Data to hash |
| -> BSalt | salt generated by genSalt |
| -> ByteString |
Hash a password based on a BSalt with a given cost
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
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