using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
namespace ProductionLineMonitor.Core.Utils
{
public static class MD5Helper
{
///
/// 字符串加密
///
/// 字符串
///
public static string To32MD5(this string str)
{
string rev = "";
MD5 md5 = MD5.Create();
byte[] buffer = Encoding.UTF8.GetBytes(str);
byte[] MD5Buffer = md5.ComputeHash(buffer);
foreach (var item in MD5Buffer)
rev += item.ToString("X2");
return rev;
}
}
}