c#中的md5方法

public static string md5(string str)
        {
            MD5 md5 = MD5.Create();
            byte[] buffer = Encoding.UTF8.GetBytes(str);
            byte[] md5Buffer = md5.ComputeHash(buffer);
            string newstr = "";
            for(int i = 0; i < md5Buffer.Length; i++)
            {
                newstr += md5Buffer[i].ToString("x2");
            }
            return newstr;
        }


打赏

看恩吧
网站不承担任何有关评论的责任
  • 最新评论
  • 总共条评论
取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦