21 lines
671 B
C#
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;
|
|
}
|
|
}
|
|
}
|