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