blob: b6ed1845d9a6163416b72badbd30328ad52ee2bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
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);
}
}
}
}
|