MD5 加密的两种方法

            System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
Random ra = new Random();
var rr= ra.Next(,);
byte[] test = System.Text.Encoding.UTF8.GetBytes(rr.ToString());
Console.WriteLine(rr);
byte[] output = md5.ComputeHash(test); Console.WriteLine("md5-1:" + BitConverter.ToString(output).Replace("-",""));
Console.WriteLine("md5-2:" + FormsAuthentication.HashPasswordForStoringInConfigFile(rr.ToString(), "MD5"));
上一篇:小程序获取图片base64编码


下一篇:svn合并