public final class PasswordUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkPasswordFormat(String strPassword)
Check whether a password contains upper and lower case letters, special
characters and numbers.
|
static boolean |
checkPasswordFormat(String strPassword,
boolean bUpperAndLowerCase,
boolean bNumero,
boolean bSpecialCaracters)
Check whether a password contains upper and lower case letters, special
characters and numbers.
|
static Timestamp |
getPasswordMaxValidDate(int nNumberDay)
Get the maximum valid date of a password starting from now with the given
number of days.
|
static String |
makePassword()
Generate a new random password
|
static String |
makePassword(int nPasswordSize,
boolean bUpperAndLowerCase,
boolean bNumbers,
boolean bSpecialCaracters)
Generate a new random password
|
public static String makePassword()
public static String makePassword(int nPasswordSize, boolean bUpperAndLowerCase, boolean bNumbers, boolean bSpecialCaracters)
nPasswordSize - the password sizebUpperAndLowerCase - true if the password must contain upper and
lower casebNumbers - if the password must contain numbersbSpecialCaracters - if the password must contain special characterspublic static boolean checkPasswordFormat(String strPassword)
strPassword - The password to checkpublic static boolean checkPasswordFormat(String strPassword, boolean bUpperAndLowerCase, boolean bNumero, boolean bSpecialCaracters)
strPassword - The password to checkbUpperAndLowerCase - true if the password must contain upper and lower casebNumero - if the password must contain numerobSpecialCaracters - if the password must contain special characterspublic static Timestamp getPasswordMaxValidDate(int nNumberDay)
nNumberDay - The number of days the password is validCopyright © 2016 City of Paris. All rights reserved.