| | |
| | | string oldGestureAuthentication = GestureAuthentication;
|
| | | GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication);
|
| | |
|
| | | var data = Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
| | | var byteData = System.Text.Encoding.UTF8.GetBytes(data);
|
| | | string fullName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
|
| | | //写入内容
|
| | | Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
|
| | | HdlFileLogic.Current.SaveFileContent(DirNameResourse.AccountOptionFile, this);
|
| | | //还原明码
|
| | | PswAuthentication = oldPswAuthentication;
|
| | | GestureAuthentication = oldGestureAuthentication;
|
| | |
| | | /// <returns></returns>
|
| | | public AccountOptionClass Load()
|
| | | {
|
| | | string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
|
| | | string fileName = DirNameResourse.AccountOptionFile;
|
| | | if (System.IO.File.Exists(fileName) == false)
|
| | | {
|
| | | return new AccountOptionClass();
|
| | | }
|
| | | try
|
| | | {
|
| | | var varByte = Shared.IO.FileUtils.ReadFile(fileName);
|
| | | var varByte = HdlFileLogic.Current.ReadFileByteContent(fileName);
|
| | | string strValue = System.Text.Encoding.UTF8.GetString(varByte);
|
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOptionClass>(strValue);
|
| | | //解密密码
|