探知,不断发现
探知不断发现
public static string MD5(this string input)
        
{
            MD5 md5 
= MD5CryptoServiceProvider.Create();
            
byte[] temp = md5.ComputeHash(Encoding.ASCII.GetBytes(input));
            
string byte2String = null;
            
for (int i = 0; i < temp.Length; i++)
            
{
                byte2String 
+= temp[i].ToString("x2");
            }


            
return byte2String;
        }

看到x2了吗?好多人是ToString("x")结果就会少位了。

posted on 2008-07-16 22:14  lovebanyi  阅读(291)  评论(0编辑  收藏  举报