You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
697 B
27 lines
697 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace APP.Utils
|
|
{
|
|
public class Utils
|
|
{
|
|
public static string GetMd5x2(string str)
|
|
{
|
|
MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
|
|
byte[] bytes = Encoding.UTF8.GetBytes(str);
|
|
bytes = provider.ComputeHash(bytes);
|
|
StringBuilder builder = new StringBuilder();
|
|
foreach (byte num in bytes)
|
|
{
|
|
builder.Append(num.ToString("x2").ToLower());
|
|
}
|
|
return builder.ToString();
|
|
}
|
|
|
|
}
|
|
}
|