using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Cryptography; using Tango.Settings; namespace Tango.AzureUtils.UI { public class AzureUtilsSettings : SettingsBase { private Rfc2898Cryptographer _crypt; public AzureUtilsSettings() { _crypt = new Rfc2898Cryptographer(); } public String Email { get; set; } public String EncryptedPassword { get; set; } [JsonIgnore] public String Password { get { return _crypt.Decrypt(EncryptedPassword); } set { EncryptedPassword = _crypt.Encrypt(value); } } } }