MD5加密

//MD5加密:
 string cryptStr = "";
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            byte[] bytes = Encoding.UTF8.GetBytes(pwd);
            byte[] cryptBytes = md5.ComputeHash(bytes);
            for (int i = 0; i < cryptBytes.Length; i++)
            {
                cryptStr += cryptBytes[i].ToString("X2");
            }

 

posted @ 2018-04-16 17:17  大黄人  阅读(323)  评论(2编辑  收藏  举报