1/// <summary>
2/// 用md5加密
3/// </summary>
4/// <param name="Sourcein">输入的数据</param>
5/// <returns></returns>
6public static string MD5(string Sourcein)
7{
8 MD5CryptoServiceProvider MD5CSP = new MD5CryptoServiceProvider();
9 byte[] MD5Source = System.Text.Encoding.UTF8.GetBytes(Sourcein);
10 byte[] MD5Out = MD5CSP.ComputeHash(MD5Source);
11
12 return Convert.ToBase64String(MD5Out);
13}