Happstack.Data.User.Password
Description
- newtype Salt = Salt String
- newtype PasswordHash = PasswordHash [Word8]
- data Password = Password Salt PasswordHash
- dataType[ahv9] :: DataType
- constr[ahva] :: Constr
- dataType[ahuZ] :: DataType
- constr[ahv0] :: Constr
- dataType[ahuO] :: DataType
- constr[ahuP] :: Constr
- checkPassword :: Password -> String -> Bool
- doHash :: Salt -> String -> PasswordHash
- changepass :: Monad m => String -> String -> Password -> m Password
- genSalt :: MonadIO m => m Salt
- newPassword :: MonadIO m => String -> m Password
Documentation
newtype PasswordHash Source
Constructors
| PasswordHash [Word8] |
Instances
| Eq PasswordHash | |
| Data PasswordHash | |
| Ord PasswordHash | |
| Read PasswordHash | |
| Show PasswordHash | |
| Typeable PasswordHash | |
| Version PasswordHash | |
| Serialize PasswordHash | |
| Default PasswordHash | |
| (Data ctx [Word8], Sat (ctx PasswordHash), Sat (ctx [Word8])) => Data ctx PasswordHash |
Constructors
| Password Salt PasswordHash |
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.