|
@ -40,8 +40,9 @@ public class Vault implements VaultInterface { |
|
|
if (input.equals("e")) { |
|
|
if (input.equals("e")) { |
|
|
config = false; |
|
|
config = false; |
|
|
}else if (input.equals("l")) { |
|
|
}else if (input.equals("l")) { |
|
|
String inputpw = scan.nextLine(); |
|
|
|
|
|
setPWLength(inputpw); |
|
|
|
|
|
|
|
|
println("Set PW length:"); |
|
|
|
|
|
String inputPw = scan.nextLine(); |
|
|
|
|
|
setPWLength(inputPw); |
|
|
}else if (!input.equals("l")|!input.equals("e")|!input.equals("h")) { |
|
|
}else if (!input.equals("l")|!input.equals("e")|!input.equals("h")) { |
|
|
println("Please enter valid key."); |
|
|
println("Please enter valid key."); |
|
|
} |
|
|
} |
|
@ -49,16 +50,12 @@ public class Vault implements VaultInterface { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setPWLength(String pwLength){ |
|
|
public void setPWLength(String pwLength){ |
|
|
println("Set PW length:"); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
PWLength = Integer.parseInt(pwLength); |
|
|
PWLength = Integer.parseInt(pwLength); |
|
|
} catch (NumberFormatException e) { |
|
|
} catch (NumberFormatException e) { |
|
|
println("Please Enter Valid Number."); |
|
|
println("Please Enter Valid Number."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
println("\nNew PWlength is now: "); |
|
|
println("\nNew PWlength is now: "); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|