public final class PasswordHashCreatorDefault extends AbstractPasswordHashCreator
IPasswordHashCreator.| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM |
static com.helger.commons.messagedigest.EMessageDigestAlgorithm |
USER_PASSWORD_ALGO
Hashing algorithm to use for user passwords - never change it!
|
| Constructor and Description |
|---|
PasswordHashCreatorDefault() |
| Modifier and Type | Method and Description |
|---|---|
String |
createPasswordHash(IPasswordSalt aSalt,
String sPlainTextPassword)
The method to create a message digest hash from a password.
|
boolean |
requiresSalt() |
getAlgorithmName, toStringpublic static final String ALGORITHM
@Nonnull public static final com.helger.commons.messagedigest.EMessageDigestAlgorithm USER_PASSWORD_ALGO
public boolean requiresSalt()
true if this hash creator requires a salt,
false if not.@Nonnull public String createPasswordHash(@Nullable IPasswordSalt aSalt, @Nonnull String sPlainTextPassword)
IPasswordHashCreatoraSalt - Optional salt to be used. This parameter is only null
for backwards compatibility reasons.sPlainTextPassword - Plain text password. May not be null.Copyright © 2014–2015 Philip Helger. All rights reserved.