passman-core-0.3.1: Deterministic password generator

CopyrightMatthew Harm Bekkema 2016
LicenseGPL-2
Maintainermbekkema97@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Passman.Core.Hash

Contents

Description

 

Synopsis

Password Generation

generatePassword Source

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

hashMasterPassword Source

Arguments

:: MasterPassword

Master password

-> IO String

Hash

Generates a hash of the master password to be stored in the config.

checkMasterPassword Source

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 pass
True