public void Remove(SecureAuthCode value) { var vault = new PasswordVault(); try { if (vault.RetrieveAll().Count == 0) { return; } var cred = vault.Retrieve(_key, value.Name); vault.Remove(cred); } catch (Exception) { // Exception is thrown if the vault isn't properly initialised return; } }
public void Write(SecureAuthCode value) { var vault = new PasswordVault(); try { vault.Add(new PasswordCredential(_key, value.Name, value.Secret)); } catch (Exception) { // Exception is thrown if the vault isn't properly initialised return; } }