using System.Text; using System; using System.Security.Cryptography; namespace JiaZhiQuan.Common.Utils { public class EncryptUtils { /// /// md5加密 /// /// /// public static string Md5Encrypt(string input) { using var md5 = MD5.Create(); byte[] hashBytes = md5.ComputeHash(Encoding.UTF8.GetBytes(input)); return BitConverter.ToString(hashBytes); } public static string Md5EncryptTolower(string input) { return Md5Encrypt(input).Replace("-", string.Empty).ToLower(); } } }