using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Security.Cryptography;
namespace Utility
{
public class Util
{
public static string MD5Hash(string str)
{
byte[] generatedHash = new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes(str));
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 16; i++)
{
sb.Append(generatedHash[i].ToString("x2"));
}
return sb.ToString();
}
}
}
浙公网安备 33010602011771号