Copyright | Matthew Harm Bekkema 2016 |
---|---|
License | GPL-2 |
Maintainer | mbekkema97@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Password Generation
:: 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
:: MasterPassword | Master password |
-> IO String | Hash |
Generates a hash of the master password to be stored in the config.
:: String | Hash |
-> MasterPassword | Master password |
-> Bool |
Tests if the master password is correct against a hash produced by
hashMasterPassword
.
>>>
hash <- hashMasterPassword pass
>>>
checkMasterPassword hash pass
True