Пример #1
0
        /// <summary>
        /// 签名
        /// </summary>
        /// <param name="keyValuePairs"></param>
        /// <param name="ts"></param>
        /// <returns></returns>
        private string GetSign(Dictionary <string, string> keyValuePairs, string ts)
        {
            keyValuePairs.Add("Gateway-Request-Time", ts);
            keyValuePairs = AsciiDictionary(keyValuePairs);
            StringBuilder builder = new StringBuilder();

            builder.Append(Config.Secret);
            foreach (var item in keyValuePairs)
            {
                builder.Append(item.Key).Append(item.Value);
            }
            builder.Append(Config.Secret);
            return(MD5Hash.GetMd5(builder.ToString()));
        }