Update 20231016
This commit is contained in:
@@ -1,26 +1,22 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user