org.riotfamily.common.util
Class PasswordGenerator
java.lang.Object
org.riotfamily.common.util.PasswordGenerator
public class PasswordGenerator
- extends Object
Class that generates random strings suitable for use as passwords.
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PasswordGenerator
public PasswordGenerator()
PasswordGenerator
public PasswordGenerator(int passwordLength,
boolean useUpperChars,
boolean useLowerChars,
boolean useDigits)
getDefaultInstance
public static PasswordGenerator getDefaultInstance()
getUseUpperChars
public boolean getUseUpperChars()
getUseLowerChars
public boolean getUseLowerChars()
getUseDigits
public boolean getUseDigits()
isIncludeAmbiguous
public boolean isIncludeAmbiguous()
setUseUpperChars
public void setUseUpperChars(boolean v)
setUseLowerChars
public void setUseLowerChars(boolean v)
setUseDigits
public void setUseDigits(boolean v)
setIncludeAmbiguous
public void setIncludeAmbiguous(boolean includeAmbiguous)
setPasswordLength
public void setPasswordLength(int i)
getPasswordLength
public int getPasswordLength()
check
protected void check()
prepare
protected void prepare()
getPossibleCombinations
public long getPossibleCombinations()
getChanceToGuess
public int getChanceToGuess(long validPasswords)
generate
public String generate()