fr.paris.lutece.util.password
Class PasswordUtil

java.lang.Object
  extended by fr.paris.lutece.util.password.PasswordUtil

public final class PasswordUtil
extends java.lang.Object

Utility class used to generate random passwords


Method Summary
static boolean checkPasswordFormat(java.lang.String strPassword)
          Check whether a password contains upper and lower case letters, special characters and numbers.
static java.sql.Timestamp getPasswordMaxValidDate(int nNumberDay)
          Get the maximum valid date of a password starting from now with the given number of days.
static java.lang.String makePassword()
          Generate a new random password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makePassword

public static java.lang.String makePassword()
Generate a new random password

Returns:
the new password

checkPasswordFormat

public static boolean checkPasswordFormat(java.lang.String strPassword)
Check whether a password contains upper and lower case letters, special characters and numbers.

Parameters:
strPassword - The password to check
Returns:
True if the password format is correct, false otherwise

getPasswordMaxValidDate

public static java.sql.Timestamp getPasswordMaxValidDate(int nNumberDay)
Get the maximum valid date of a password starting from now with the given number of days.

Parameters:
nNumberDay - The number of days the password is valid
Returns:
The maximum valid date of a password


Copyright © 2013 Mairie de Paris. All Rights Reserved.