|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.PasswordGenerator
public class PasswordGenerator
PasswordGenerator creates passwords that meet password rule
criteria.
| Constructor Summary | |
|---|---|
PasswordGenerator()
Default constructor. |
|
PasswordGenerator(java.util.Random r)
Creates a new PasswordGenerator with the supplied random. |
|
| Method Summary | |
|---|---|
protected void |
fillRandomCharacters(java.lang.CharSequence source,
int count,
java.lang.Appendable target)
Fills the supplied target with count random characters from source. |
java.lang.String |
generatePassword(int length,
java.util.List<CharacterRule> rules)
Generates a password of the supplied length which meets the requirements of the supplied character rules. |
protected void |
randomize(java.nio.CharBuffer buffer)
Randomizes the contents of the given buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PasswordGenerator()
SecureRandom for password
generation.
public PasswordGenerator(java.util.Random r)
PasswordGenerator with the supplied random.
r - Random| Method Detail |
|---|
public java.lang.String generatePassword(int length,
java.util.List<CharacterRule> rules)
length - intrules - List of rules to generate password from
String - generated password
protected void fillRandomCharacters(java.lang.CharSequence source,
int count,
java.lang.Appendable target)
source - CharSequence of random characters.count - int number of random characters.target - Appendable character sequence that will hold
characters.protected void randomize(java.nio.CharBuffer buffer)
buffer - Character buffer whose contents will be randomized.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||