/// <summary> /// 把字符串加密(可以进行解密),并且把加密结果转换为base64编码. /// </summary> /// <param name="rawString">需要加密的数据</param> /// <param name="passwordString">用来加密的密钥</param> /// <returns></returns> public static string EncryptByTriple(string rawString, string passwordString) { byte[] passwordBytes = EncodingUtility.ToBytesFromUnicode(passwordString); byte[] passwordMd5Bytes = ComputeHashByMD5(passwordBytes); return(EncryptByTriple(rawString, DefaultEncoding, passwordMd5Bytes, passwordMd5Bytes)); }