|
@ -8,7 +8,8 @@ public class Vault implements VaultInterface { |
|
|
|
|
|
|
|
|
public boolean config; |
|
|
public boolean config; |
|
|
public int PWLength; |
|
|
public int PWLength; |
|
|
public boolean haveCapitals = false; |
|
|
|
|
|
|
|
|
public boolean haveCapitals; |
|
|
|
|
|
public boolean hasSpecialChars; |
|
|
InputStream inputS = System.in; |
|
|
InputStream inputS = System.in; |
|
|
OutputStream outputS = System.out; |
|
|
OutputStream outputS = System.out; |
|
|
|
|
|
|
|
@ -75,7 +76,7 @@ public class Vault implements VaultInterface { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setCapital() { |
|
|
public void setCapital() { |
|
|
println("Should you PW have Capitals? Type in yes or no."); |
|
|
|
|
|
|
|
|
println("Should you PW have capitals? Type in yes or no."); |
|
|
|
|
|
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
Scanner scan = new Scanner(inputS); |
|
|
String input = scan.nextLine(); |
|
|
String input = scan.nextLine(); |
|
@ -88,4 +89,20 @@ public class Vault implements VaultInterface { |
|
|
println("Your PWs don´t have capitals anymore."); |
|
|
println("Your PWs don´t have capitals anymore."); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSpecialChar() { |
|
|
|
|
|
println("Should you PW have special characters? Type in yes or no."); |
|
|
|
|
|
|
|
|
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
|
|
|
String input = scan.nextLine(); |
|
|
|
|
|
|
|
|
|
|
|
if(input.equals("yes")){ |
|
|
|
|
|
hasSpecialChars = true; |
|
|
|
|
|
println("Your PWs contain now special characters."); |
|
|
|
|
|
}else if(input.equals("no")){ |
|
|
|
|
|
hasSpecialChars = false; |
|
|
|
|
|
println("Your PWs don´t have special characters anymore."); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |