日期:2014-05-17 浏览次数:20453 次
//加密 public string Encrypt(string pToEncrypt) { byte[] barray = System.Text.UnicodeEncoding.Unicode.GetBytes(pToEncrypt); return Convert.ToBase64String(barray); } //解密 public string Decrypt(string pToDecrypt) { byte[] mingwen = Convert.FromBase64String(pToDecrypt); string str = System.Text.UnicodeEncoding.Unicode.GetString(mingwen); return str; }