|
@ -4,6 +4,7 @@ public class PasswordGenerator { |
|
|
|
|
|
|
|
|
final String lowercaseCharacters = "abcdefghjkmnpqrstuvwxyz"; |
|
|
final String lowercaseCharacters = "abcdefghjkmnpqrstuvwxyz"; |
|
|
final String uppercaseCharacters = "ABCDEFGHJKMNPQRSTUVWXYZ"; |
|
|
final String uppercaseCharacters = "ABCDEFGHJKMNPQRSTUVWXYZ"; |
|
|
|
|
|
final String digits = "0123456789"; |
|
|
|
|
|
|
|
|
int length = 12; |
|
|
int length = 12; |
|
|
|
|
|
|
|
@ -22,6 +23,7 @@ public class PasswordGenerator { |
|
|
|
|
|
|
|
|
characterPool += lowercaseCharacters; |
|
|
characterPool += lowercaseCharacters; |
|
|
characterPool += uppercaseCharacters; |
|
|
characterPool += uppercaseCharacters; |
|
|
|
|
|
characterPool += digits; |
|
|
|
|
|
|
|
|
for (int generatorPosition = 0; generatorPosition < getLength(); generatorPosition++) { |
|
|
for (int generatorPosition = 0; generatorPosition < getLength(); generatorPosition++) { |
|
|
generatedPassword.append(characterPool.charAt(rand.nextInt(characterPool.length()))); |
|
|
generatedPassword.append(characterPool.charAt(rand.nextInt(characterPool.length()))); |
|
|