This commit is contained in:
2025-03-24 15:20:33 +08:00
parent 9a5d3be528
commit b8d7371a56
22 changed files with 8562 additions and 496 deletions

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace DHSoftware.Utils
{
// 密码加密辅助类
public static class HashHelper
{
public static string MD5Encrypt(string input)
{
using (var md5 = MD5.Create())
{
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
return BitConverter.ToString(hashBytes).Replace("-", "");
}
}
}
}