MD5

public static string MD5Encrypt(string text)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            byte[] b = Encoding.Default.GetBytes(text);
            byte[] b2 = md5.ComputeHash(b);
            string result = BitConverter.ToString(b2);
            result = result.Replace("-", "").ToLower();
            return result;
        }

 

posted @ 2019-07-19 14:45  天天的蓝色  阅读(141)  评论(0编辑  收藏  举报