|
|
@ -21,6 +21,7 @@ public class Vault implements VaultInterface { |
|
|
|
OutputStream outputS = System.out; |
|
|
|
|
|
|
|
private CredentialRepository credentialRepository = new CredentialRepository(); |
|
|
|
private PasswordGenerator passwordGenerator = new PasswordGenerator(); |
|
|
|
|
|
|
|
/*public static void main (String args[]) { |
|
|
|
Vault vault = new Vault(); |
|
|
@ -99,9 +100,17 @@ public class Vault implements VaultInterface { |
|
|
|
println("Type in username"); |
|
|
|
userName = scan.nextLine(); |
|
|
|
|
|
|
|
println("Do you want to set your password manually?\nyes or no"); |
|
|
|
|
|
|
|
if(scan.nextLine().equals("yes")) { |
|
|
|
println("Type in password"); |
|
|
|
password = scan.nextLine(); |
|
|
|
credentialRepository.createNewCredential(userName, password); |
|
|
|
} else { |
|
|
|
println("Generating password."); |
|
|
|
password = passwordGenerator.generateRandomPassword(); |
|
|
|
credentialRepository.createNewCredential(userName, password); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void showCredential() { |
|
|
|