C#Md5加密

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace Utility
{
public class MD5
{

public static string GetStrMd5(string ConvertString)
{

MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();

string t2 = BitConverter.ToString(md5.ComputeHash( UTF8Encoding.Default.GetBytes(ConvertString)));

t2 = t2.Replace("-", "");

return t2;

 

}
}
}

posted @ 2013-03-28 17:02  冰深  阅读(147)  评论(0编辑  收藏  举报