示例#1
0
文件: SafeC.cs 项目: baixue001/IPS
 /// <summary>
 /// 更新Cert,如果不存在则新建
 /// </summary>
 public static void Cert_Update()
 {
     if (!File.Exists(IOPath.VToP(certPath)))
     {
         certKey = Cert_NoExistThenNew();
     }
     try
     {
         string key = ReadFileStr(certPath);
         if (!string.IsNullOrEmpty(key))
         {
             key = EncryHelper.DesDecrypt(key);
         }
         else
         {
             key = "";
         }
         certKey = key;
     }
     catch { certKey = ""; }
 }
示例#2
0
文件: SafeC.cs 项目: baixue001/IPS
 public static string Cert_Decry(string str)
 {
     try { return(EncryHelper.AESDecrypt(str, certKey)); } catch { return(str); };
 }
示例#3
0
文件: SafeC.cs 项目: baixue001/IPS
 public static string Cert_Encry(string str)
 {
     return(EncryHelper.AESEncrypt(str, certKey));
 }