Exemplo n.º 1
0
        /// <summary>
        /// 参数加密
        /// </summary>
        /// <param name="jsonStr"></param>
        /// <returns></returns>
        private string EncodeString(string jsonStr)
        {
            string result = string.Empty;

            EncDecUtil encDecUtil = new EncDecUtil();
            string     key        = encDecUtil.encyptData(jsonStr, accesskey);
            string     sign       = encDecUtil.signData(key, accesskey);

            result = string.Format("key={0}&sign={1}&clientId={2}",
                                   HttpUtility.UrlEncode(key),
                                   HttpUtility.UrlEncode(sign),
                                   clientId);
            return(result);
        }