1.首先目前MD5加密已经达到初步加密效果了,由于因为常用,所以很多人将加密后报文进行保存;就形成所谓解密;所以有很多解密网站。
2.双重加密的原理,在第一次加密后的报文进行追加固定混淆值(混淆值:就是自己固定的字符串,目的混淆加密报文),再将处理后的报文进行二次加密,
MD5 32位 加密
/// <summary> /// MD5字符串加密 /// </summary> /// <param name="txt"></param> /// <returns>加密后字符串</returns> public static string GenerateMD5(string txt) { using (MD5 mi = MD5.Create()) { byte[] buffer = Encoding.Default.GetBytes(txt); //开始加密 byte[] newBuffer = mi.ComputeHash(buffer); StringBuilder sb = new StringBuilder(); for (int i = 0; i < newBuffer.Length; i++) { sb.Append(newBuffer[i].ToString("x2")); } return sb.ToString(); } }