public class HashedPasswordService
extends java.lang.Object
implements de.innovationgate.wga.modules.RegistryAwareModule
| Constructor and Description |
|---|
HashedPasswordService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkEqual(de.innovationgate.utils.security.HashedPassword hashedPassword,
java.lang.String cleartextPassword)
Checks if a hashed password and a cleartext password are equal
|
de.innovationgate.utils.security.HashedPassword |
create(java.lang.String cleartextPassword,
java.lang.Object salt)
Creates a new hashed password from a cleartext password and a salt value
|
java.lang.Object |
generateSalt()
Generates a salt value to be used with
create(String, Object) on hashed password creation |
void |
injectRegistry(de.innovationgate.wga.modules.ModuleRegistry registry) |
de.innovationgate.utils.security.HashedPassword |
read(java.lang.String hashedPassword)
Reads a stored hashed password
|
public void injectRegistry(de.innovationgate.wga.modules.ModuleRegistry registry)
injectRegistry in interface de.innovationgate.wga.modules.RegistryAwareModulepublic de.innovationgate.utils.security.HashedPassword create(java.lang.String cleartextPassword,
java.lang.Object salt)
throws de.innovationgate.utils.security.HashingException,
de.innovationgate.webgate.api.WGException
cleartextPassword - The cleartext passwordsalt - The salt, generated by generateSalt()HashedPassword.toString() for the storable string representation.de.innovationgate.utils.security.HashingExceptionde.innovationgate.webgate.api.WGExceptionpublic de.innovationgate.utils.security.HashedPassword read(java.lang.String hashedPassword)
hashedPassword - The stored hashed password stringcheckEqual(HashedPassword, String) to check it against a cleartext password for equalitypublic java.lang.Object generateSalt()
throws de.innovationgate.utils.security.HashingException,
de.innovationgate.webgate.api.WGException
create(String, Object) on hashed password creationde.innovationgate.utils.security.HashingExceptionde.innovationgate.webgate.api.WGExceptionpublic boolean checkEqual(de.innovationgate.utils.security.HashedPassword hashedPassword,
java.lang.String cleartextPassword)
throws de.innovationgate.utils.security.HashingException
hashedPassword - The hashed password, read via read(String) or created via create(String, Object)cleartextPassword - The cleartext password to checkde.innovationgate.utils.security.HashingException