public class PasswordHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SPLIT_PASSWORD_LENGTH |
static java.lang.String |
SPLIT_PASSWORD_SEPARATOR |
| Constructor and Description |
|---|
PasswordHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generateSequence(java.lang.String salt,
java.lang.String password,
PasswordInputMethod input)
Generates a hashed sequence using the given password.
If input type is VIRTUAL_KEYBOARD this method splits password into subsequences and applies hash+salt to each subsequence. Returns a string with generated subsequences joined by a separator. SPLIT_PASSWORD_LENGTH constant is used to define each subsequence length. SPLIT_PASSWORD_SEPARATOR constant is used as separator to join subsequences. |
static boolean |
isValid(java.lang.String value,
Password password)
Determines whether the given plain value is equals to the given password.
This method will process (hash+salt) the given value and will try by brute force* to match the given password. * Only if the value can be split in sequences |
public static final int SPLIT_PASSWORD_LENGTH
public static final java.lang.String SPLIT_PASSWORD_SEPARATOR
public static java.lang.String generateSequence(java.lang.String salt,
java.lang.String password,
PasswordInputMethod input)
public static boolean isValid(java.lang.String value,
Password password)