using System.Text; namespace XGame.Framework.Utils { /// /// 安全性工具类 /// public static partial class SecurityUtils { public static string MD5(string input) { var output = MD5(Encoding.UTF8.GetBytes(input)); return output.ToHexString(); } public static byte[] MD5(byte[] input) { var md5 = System.Security.Cryptography.MD5.Create(); return md5.ComputeHash(input); } } }