验签: 调用方法以 /order/Create 为示例 加密前参数:106411716515387000/order/Create 加密后的数据:ZZY-OPENAPI:10641:JfoHFmOIbd0zjWba4qgbToLlwcQ= --以下是c#代码示例 var data = $"{partnerId}{date}{apiPath}"; sign = TravelB2B.Core.Utils.Tools.HmacSha1Sign(data, signKey); sign = $"{AUTH_PUB}:{setting.DistributorUserID}:{sign}"; public static String HmacSha1Sign(string data, string key) { Encoding encode = Encoding.GetEncoding("utf-8"); byte[] byteData = encode.GetBytes(data); byte[] byteKey = encode.GetBytes(key); System.Security.Cryptography.HMACSHA1 hmac = new System.Security.Cryptography.HMACSHA1(byteKey); using (System.Security.Cryptography.CryptoStream cs = new System.Security.Cryptography.CryptoStream(System.IO.Stream.Null, hmac, System.Security.Cryptography.CryptoStreamMode.Write)) { cs.Write(byteData, 0, byteData.Length); cs.Close(); } return Convert.ToBase64String(hmac.Hash); }