|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.passwordrules.standard.StandardGenerator
Default generator used to generate passwords using a random number algorithm.
Field Summary | |
static int |
DEFAULT_LENGTH
Default number of character templates translating to default length of the generated password. |
Fields inherited from interface com.ibm.passwordrules.PasswordGenerator |
LAST_CHARACTER_INDEX |
Constructor Summary | |
StandardGenerator()
Default constructor |
Method Summary | |
void |
addChars(char[] list)
Method called by classes implementing Rule interface used to constrain he set of character templates to be used by the generator. |
void |
allLowerCase()
Method called by classes implementing Rule interface used to constrain the set of character templates to be used by the generator to contain only lower case characters. |
void |
allUpperCase()
Method called by classes implementing Rule interface used to constrain the set of character templates to be used by the generator to contain only upper case characters. |
java.lang.String |
generate()
Method will generate a password |
void |
initialize(java.lang.String parameter)
Method will prepare the generator instance to use custom character ranges if provided in the given parameter. |
void |
removeChars(char[] charList)
Method called by classes implementing Rule interface used to constrain he set of character templates to be used by the generator. |
void |
setCharListAt(char[] charList,
int startIndex,
int endIndex)
Method called by classes implementing Rule interface used to constrain the set of characters to be used by the generator. |
void |
setLength(int length)
Method called by classes implementing Rule interface used to constrain he set of character templates to be used by the generator. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_LENGTH
Constructor Detail |
public StandardGenerator()
Method Detail |
public java.lang.String generate()
generate
in interface PasswordGenerator
public void setLength(int length)
setLength
in interface PasswordGenerator
numChars
- Number of character templates to increase bypublic void addChars(char[] list)
addChars
in interface PasswordGenerator
list
- of characters to add to all the character templates.public void removeChars(char[] charList)
removeChars
in interface PasswordGenerator
charList
- list of characters to remove from all the character templates.public void allUpperCase()
allUpperCase
in interface PasswordGenerator
public void allLowerCase()
allLowerCase
in interface PasswordGenerator
public void setCharListAt(char[] charList, int startIndex, int endIndex)
setCharListAt
in interface PasswordGenerator
charList
- list of characters to setindex
- of the first character to setpublic void initialize(java.lang.String parameter)
initialize
in interface PasswordGenerator
parameter
- - may contain unicode ranges of characters to be used in the generator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |