|
@ -11,7 +11,7 @@ public class Vault implements VaultInterface { |
|
|
public boolean haveCapitals; |
|
|
public boolean haveCapitals; |
|
|
public boolean hasSpecialChars; |
|
|
public boolean hasSpecialChars; |
|
|
public boolean hasNumbers; |
|
|
public boolean hasNumbers; |
|
|
public String userName; |
|
|
|
|
|
|
|
|
public boolean credentialM; |
|
|
InputStream inputS = System.in; |
|
|
InputStream inputS = System.in; |
|
|
OutputStream outputS = System.out; |
|
|
OutputStream outputS = System.out; |
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ public class Vault implements VaultInterface { |
|
|
} else if (input.equals("n")) { |
|
|
} else if (input.equals("n")) { |
|
|
println("Should you PW have numbers? Type in yes or no."); |
|
|
println("Should you PW have numbers? Type in yes or no."); |
|
|
String inputN = scan.nextLine(); |
|
|
String inputN = scan.nextLine(); |
|
|
setNumbers(input); |
|
|
|
|
|
|
|
|
setNumbers(inputN); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -120,4 +120,30 @@ public class Vault implements VaultInterface { |
|
|
println("Your PWs don´t have numbers anymore."); |
|
|
println("Your PWs don´t have numbers anymore."); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void credentialMenu() { |
|
|
|
|
|
StringBuilder sbcm = new StringBuilder(); |
|
|
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
|
|
|
credentialM = true; |
|
|
|
|
|
|
|
|
|
|
|
sbcm.append("Configure credentials:\n"); |
|
|
|
|
|
sbcm.append("- add credential: a\n"); |
|
|
|
|
|
sbcm.append("- show credential: c\n"); |
|
|
|
|
|
sbcm.append("- edit credential: l\n"); |
|
|
|
|
|
sbcm.append("- exit: e\n"); |
|
|
|
|
|
|
|
|
|
|
|
println(sbcm.toString()); |
|
|
|
|
|
|
|
|
|
|
|
String input = scan.nextLine(); |
|
|
|
|
|
|
|
|
|
|
|
if (input.equals("e")) { |
|
|
|
|
|
credentialM = false; |
|
|
|
|
|
} else if (input.equals("a")) { |
|
|
|
|
|
println("Type username:"); |
|
|
|
|
|
} else if (input.equals("c")) { |
|
|
|
|
|
println("Type username or ID to show credential:"); |
|
|
|
|
|
} else if (input.equals("l")) { |
|
|
|
|
|
println("Type username or ID to select credential:"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |