Пример #1
0
        /// <summary>
        /// 组织Sign
        /// </summary>
        /// <param name="bdh"></param>
        /// <returns></returns>
        private string GetSign(string bdh)
        {
            var partBdh  = bdh.PadLeft(16, '0');
            var plainKey = $"{partBdh.Substring(bdh.Length - 16, 16)}{_httpClient.Timestamp}{_httpClient.Key}";

            return(_httpClient.MD5Sign(plainKey));
        }
Пример #2
0
        /// <summary>
        /// 组织Sign
        /// </summary>
        /// <returns></returns>
        private string GetSign()
        {
            var partTime = _httpClient.Timestamp.ToString().PadRight(16, '0');
            var plainKey = $"{partTime}{_httpClient.Timestamp}{_httpClient.Key}";

            return(_httpClient.MD5Sign(plainKey));
        }
Пример #3
0
        /// <summary>
        /// 组织Sign
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="star"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        private string GetSign(int companyId, string star, string end)
        {
            var partParam = $"{companyId}{star}{end}";
            var plainKey  = $"{partParam.Substring(0, 16)}{_httpClient.Timestamp}{_httpClient.Key}";

            return(_httpClient.MD5Sign(plainKey));
        }