|
|
@ -12,6 +12,9 @@ public class Vault implements VaultInterface { |
|
|
|
public boolean hasSpecialChars; |
|
|
|
public boolean hasNumbers; |
|
|
|
public boolean credentialM; |
|
|
|
public String userName; |
|
|
|
public String password; |
|
|
|
public boolean isInt = false; |
|
|
|
InputStream inputS = System.in; |
|
|
|
OutputStream outputS = System.out; |
|
|
|
|
|
|
@ -72,10 +75,29 @@ public class Vault implements VaultInterface { |
|
|
|
|
|
|
|
|
|
|
|
public void addCredential(){ |
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
|
println("Type in username"); |
|
|
|
userName = scan.nextLine(); |
|
|
|
|
|
|
|
println("Type in password"); |
|
|
|
password = scan.nextLine(); |
|
|
|
//createNewCredential(userName, password); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void showCredential(){ |
|
|
|
Scanner scan = new Scanner(inputS); |
|
|
|
println("Type in ID or username"); |
|
|
|
|
|
|
|
String str = scan.nextLine(); |
|
|
|
|
|
|
|
if(str.matches("[0-9]+")) { |
|
|
|
isInt = true; |
|
|
|
//getCredentialsViaId(Integer.parseInt(str)); |
|
|
|
} else { |
|
|
|
isInt = false; |
|
|
|
//getCredentialsViaName(str); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|