.Net Core中使用md5
.NET Core中使用System.Security.Cryptography.MD5
类,找不到请添加NuGet:System.Security.Cryptography.Algorithms
public static string GetMD5(string str)
{
var md5 = System.Security.Cryptography.MD5.Create();
byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(str));
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}
Categories
Tags
Jekyll(3)
Windows(1)
GitHub(4)
vs(4)
Portable(1)
hompage(1)
sitemap(1)
ruby(1)
gem(1)
qrcode(1)
jquery(1)
responsive(1)
Linux(6)
crontab(1)
sqlserver(4)
split(1)
backup(1)
js(1)
version(1)
csharp(2)
office(1)
com(1)
iis(1)
win8(1)
drag(1)
remote desktop(1)
Git GUI(1)
mail(1)
HTML(1)
table(1)
service(1)
32bit(1)
python(5)
pylesson(4)
volatile(1)
multithreading(1)
singleton(1)
webapi(2)
actionfilter(3)
filterprovider(1)