|
|
@ -31,6 +31,8 @@ public class Vault implements VaultInterface { |
|
|
|
sbcm.append("Configure:\n"); |
|
|
|
sbcm.append("- Password length: l\n"); |
|
|
|
sbcm.append("- Have Capitals: h\n"); |
|
|
|
sbcm.append("- Have Special Characters: s\n"); |
|
|
|
sbcm.append("- Have Numbers: n\n"); |
|
|
|
sbcm.append("- exit: e\n"); |
|
|
|
|
|
|
|
println(sbcm.toString()); |
|
|
@ -46,7 +48,11 @@ public class Vault implements VaultInterface { |
|
|
|
} else if (input.equals("h")) { |
|
|
|
println("Should your PW have capitals? Type in yes or no."); |
|
|
|
String inputC = scan.nextLine(); |
|
|
|
setPWLength(inputC); |
|
|
|
setCapital(inputC); |
|
|
|
} else if (input.equals("s")){ |
|
|
|
println("Should you PW have special characters? Type in yes or no."); |
|
|
|
String inputS = scan.nextLine(); |
|
|
|
setSpecialChar(inputS); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -96,11 +102,7 @@ public class Vault implements VaultInterface { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setSpecialChar() { |
|
|
|
println("Should you PW have special characters? Type in yes or no."); |
|
|
|
|
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
|
String input = scan.nextLine(); |
|
|
|
public void setSpecialChar(String input) { |
|
|
|
|
|
|
|
if(input.equals("yes")){ |
|
|
|
hasSpecialChars = true; |
|
|
|