MD5加密
1public static string ConvertMD5(string str)
2{
3byte[] b=System.Text.Encoding.Default.GetBytes(str);
4b=new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b);
5StringBuilder sb = new StringBuilder();
6for(int i=0;i<b.Length;i++){
7sb.AppenD(b[i].ToString ("x").PadLeft(2,'0'));
8return sb.ToString();
9}
10
2{
3byte[] b=System.Text.Encoding.Default.GetBytes(str);
4b=new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b);
5StringBuilder sb = new StringBuilder();
6for(int i=0;i<b.Length;i++){
7sb.AppenD(b[i].ToString ("x").PadLeft(2,'0'));
8return sb.ToString();
9}
10