/** * author:Anby * use:Get md5 * time:2013-4-26 */using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography;using System.Text;namespace BLL{ public static class MD5Helper { public static string getMd5(string message) { MD5 md5 = MD5.Create(); byte[] buffter = System.Text.Encoding.UTF8.GetBytes(message); byte[] md5Buf = md5.ComputeHash(buffter); StringBuilder sb = new StringBuilder(); for (int i = 0; i < md5Buf.Length; i++) { sb.Append(md5Buf[i].ToString("x2")); } return sb.ToString(); } }}