Browse Source

fix password generator requirement implementation for every configured character

feature-password-generator
binsky 3 years ago
parent
commit
cbd3124ac2
  1. 8
      src/main/java/PasswordGenerator.java

8
src/main/java/PasswordGenerator.java

@ -38,13 +38,13 @@ public class PasswordGenerator {
if (isRequireEveryConfiguredCharacterType()) {
if (generatorPosition == 0 && isUseLowercase()) {
customCharacterPool += lowercaseCharacters;
customCharacterPool = lowercaseCharacters;
} else if (generatorPosition == 1 && isUseUppercase()) {
customCharacterPool += uppercaseCharacters;
customCharacterPool = uppercaseCharacters;
} else if (generatorPosition == 2 && isUseDigits()) {
customCharacterPool += digits;
customCharacterPool = digits;
} else if (generatorPosition == 3 && isUseSpecialCharacters()) {
customCharacterPool += specialCharacters;
customCharacterPool = specialCharacters;
} else {
customCharacterPool = characterPool;
}

Loading…
Cancel
Save