/// <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 = ""; } }
public static string Cert_Decry(string str) { try { return(EncryHelper.AESDecrypt(str, certKey)); } catch { return(str); }; }
public static string Cert_Encry(string str) { return(EncryHelper.AESEncrypt(str, certKey)); }