public static string DecryptString(string input, bool throwException) { string str = ""; try { str = input; if (!MD5Util.ValidateValue(str)) { throw new Exception("字符串无法转换成功!"); } return(MD5Util.RemoveMD5Profix(Base64Util.Decrypt(MD5Util.RemoveMD5Profix(str)))); } catch { if (throwException) { throw; } return(""); } }
public static string EncryptString(string input) { return(MD5Util.AddMD5Profix(Base64Util.Encrypt(MD5Util.AddMD5Profix(input)))); }