| Copyright | Matthew Harm Bekkema 2016 |
|---|---|
| License | GPL-2 |
| Maintainer | mbekkema97@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Passman.Core.Hash
Description
Password Generation
Arguments
| :: PassListEntry | |
| -> MasterPassword | The master password |
| -> String | The generated password |
Deterministically generates a password.
Master Password
data MasterPassword Source
Represents valid master passwords.
masterPassword :: String -> Maybe MasterPassword Source
Turn a string into a master password. Nothing if it contains invalid
bytes or is too long
fromMasterPassword :: MasterPassword -> String Source
Turn a master password back into a string.
Hashing
Arguments
| :: MasterPassword | Master password |
| -> IO String | Hash |
Generates a hash of the master password to be stored in the config.
Arguments
| :: String | Hash |
| -> MasterPassword | Master password |
| -> Bool |
Tests if the master password is correct against a hash produced by
hashMasterPassword.
>>>hash <- hashMasterPassword pass>>>checkMasterPassword hash passTrue