凌寒飘香

____成风破浪会有时,直把云帆济沧海!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

   private string fun_md5(string str)
   {
        byte[] b = System.Text.Encoding.GetEncoding(1252).GetBytes(str);
        b = new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b);
        string ret = "";
        for (int i = 0; i < b.Length; i++)
            ret += b[i].ToString("x").PadLeft(2, '0');
        return ret;
    }

posted on 2006-09-12 09:46  凌寒飘香  阅读(206)  评论(0编辑  收藏  举报