asp.net md5加密

using System.Security.Cryptography;
using System.Text;

string MD5(string data)
        {
            // This is one implementation of the abstract class MD5.
            Encoding ecd = Encoding.UTF8;
            byte[] bs = ecd.GetBytes(data);
            MD5 md5 = new MD5CryptoServiceProvider();

            byte[] result = md5.ComputeHash(bs);

            return ecd.GetString(result);
        }
原文地址:https://www.cnblogs.com/mengxingxinqing/p/3079358.html