public static void AddPassword(PasswordRegistry passwordRegistry, PasswordRegistryTypes passwordRegistryTypes, string password) { var secureString = new SecureString(); foreach (var character in password) { secureString.AppendChar(character); } passwordRegistry.AddItemToRegistry(passwordRegistryTypes, secureString); }
public void Can_Add_Item_To_Registry() { _passwordRegistry.AddItemToRegistry(PasswordRegistryTypes.IpfsPassword, _secureString).Should().BeTrue(); _passwordRegistry.RegistryContainsKey(PasswordRegistryTypes.IpfsPassword).Should().BeTrue(); }