using Org.BouncyCastle.Utilities.Encoders; namespace Admin.NET.Core; /// /// SM工具类 /// public class SMUtil { public static string StrToHex(string str) { return Encoding.ASCII.GetString(Hex.Encode(Encoding.UTF8.GetBytes(str))).ToUpper(); } }