标签:
c#MD5珍藏
using System;
using System.Collections.Generic;
using System.Text;
namespace MD5
{
public class Util
{
public string getMD5(string WenBen)
{
try
{
StringBuilder sb = new StringBuilder();
foreach (byte b in System.Security.Cryptography.MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(WenBen)))
{
sb.Append(b.ToString("X2"));
}
return sb.ToString();
}
catch (Exception ex)
{
return ex.Message;
}
}
}
}
标签:
原文地址:http://www.cnblogs.com/xiaoliu66007/p/4930226.html