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 |
static java.lang.String |
SPLIT_SEQUENCE_SEPARATOR |
| Constructor and Description |
|---|
PasswordHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
generateVirtualKeyboardSequence(PasswordType passwordType,
java.lang.String passwordValue)
Generates a valid virtual keyboard sequence for the given password type, and current password value.
|
static boolean |
isTooObvious(java.lang.String value,
java.util.Collection<java.lang.String> forbidden)
Check if the given password value is too obvious to be accepted
|
static java.util.List<java.lang.String> |
toVirtualKeyboardSequences(java.lang.String text)
Converts a text, separated by
SPLIT_SEQUENCE_SEPARATOR, having each button text separated by
SPLIT_PASSWORD_SEPARATOR into a
list of strings |
static java.lang.String |
toVirtualKeyboardText(java.util.List<java.lang.String> sequences)
Converts list of strings into a text, separated by
SPLIT_SEQUENCE_SEPARATOR, having each button text
separated by
SPLIT_PASSWORD_SEPARATOR |
public static final int SPLIT_PASSWORD_LENGTH
public static final java.lang.String SPLIT_PASSWORD_SEPARATOR
public static final java.lang.String SPLIT_SEQUENCE_SEPARATOR
public static java.util.List<java.lang.String> generateVirtualKeyboardSequence(PasswordType passwordType, java.lang.String passwordValue)
PasswordInputMethod.VIRTUAL_KEYBOARD, returns null.public static boolean isTooObvious(java.lang.String value,
java.util.Collection<java.lang.String> forbidden)
throws ValidationException
ValidationExceptionpublic static java.util.List<java.lang.String> toVirtualKeyboardSequences(java.lang.String text)
SPLIT_SEQUENCE_SEPARATOR, having each button text separated by
SPLIT_PASSWORD_SEPARATOR into a
list of stringspublic static java.lang.String toVirtualKeyboardText(java.util.List<java.lang.String> sequences)
SPLIT_SEQUENCE_SEPARATOR, having each button text
separated by
SPLIT_PASSWORD_SEPARATOR