public interface PasswordPolicy
PasswordPolicy
defines how a valid password looks like, is able to create such a password and to check
whether a given character-sequence is a valid password according to the requirements.Modifier and Type | Field and Description |
---|---|
static String |
LOWERCASE
lowercase letters a-z
|
static String |
NUMBER
numbers 0-9
|
static String |
PUNCT
punctuation characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
static String |
UPPERCASE
uppercase letters A-Z
|
Modifier and Type | Method and Description |
---|---|
String |
generatePassword()
Generates a new random password that matches the requirements and returns it.
|
String |
getErrorMessageKey()
Returns the message-key of an errormessage for the case that the password doesn't match the requirements.
|
boolean |
isValidPassword(char[] password)
Checks whether the given character-sequence is a valid password.
|
static final String NUMBER
static final String LOWERCASE
static final String UPPERCASE
static final String PUNCT
boolean isValidPassword(char[] password)
password
- the character-sequence sequence to checktrue
if the character-sequence is a valid password, false
otherwiseString getErrorMessageKey()
String generatePassword()
Copyright © 2011–2019 aiticon GmbH. All rights reserved.