2025-06-09 16:41:26 +08:00

21 lines
671 B
C#

using System;
using System.Globalization;
using U8Server.Extensions;
namespace U8Server.Util
{
public class GetSign
{
public static string GetBy16Md5()
{
string appId = "gN9yId!!lfwaRoi3";
string appSecret = "xr35$IQAutBRX1UYhgOUY#CqChI#Y3b$";
string timestamp = DateTime.Now.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture);
string key = $"{appSecret}{appId}{timestamp}{appSecret}";
string sign = key.ToMD5Encrypt(uppercase: false, is16bit: true)
?? throw new InvalidOperationException("MD5加密失败");
return sign;
}
}
}