| | |
| | | { |
| | | config = new Config { }; |
| | | } |
| | | } |
| | | |
| | | if (config.PasswordEncrypt != string.Empty)
|
| | | {
|
| | | //解密
|
| | | config.Password = Phone.UserCenter.UserCenterLogic.DecryptPassword("hD1(La3o", config.PasswordEncrypt);
|
| | | } |
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 当前登录的帐号 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 当前帐号密码 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string Password = string.Empty; |
| | | /// <summary>
|
| | | /// 加密密码
|
| | | /// </summary> |
| | | public string PasswordEncrypt = string.Empty; |
| | | /// <summary> |
| | | /// 短信登录返回的md5后的密码 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public void Save() |
| | | { |
| | | //加密,不能保存明码 |
| | | this.PasswordEncrypt = Phone.UserCenter.UserCenterLogic.EncryptPassword("hD1(La3o", this.Password); |
| | | var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); |
| | | Shared.IO.FileUtils.WriteFileByBytes(fileName, bytes); |
| | | ReFresh(); |