happstack-helpers-0.52: Convenience functions for Happstack.

Happstack.Data.User.Password

Description

 

Synopsis

Documentation

newtype Salt Source

Constructors

Salt String 

checkPasswordSource

Arguments

:: Password

stored salt and password hash

-> String

password to test (unhashed)

-> Bool

did it match

check if the submitted password matches the stored password

doHash :: Salt -> String -> PasswordHashSource

hash a password using the supplied salt Originally implemented using SHA1. By switching to pbkdf2, we don't rely on implementation of randomIO being cryptographically secure.

changepass :: Monad m => String -> String -> Password -> m PasswordSource

changepass oldpassTryString newpassString p@(Password salt hash) = ... Change password, requires old password as an additional security measure

genSalt :: MonadIO m => m SaltSource

generate some random salt returns 4 Char of salt.

newPassword :: MonadIO m => String -> m PasswordSource

generate a new salted/hashed Password from the given input string