static Dictionary <string, string> fillSign(Dictionary <string, string> dict) { Dictionary <string, string> result = dict; string str = ""; foreach (var item in result.OrderBy(q => q.Key)) { if (item.Key == "sign_type") { continue; } if (item.Key == "sign") { continue; } //str = str + item.Key + "=" + MyEncoding.UrlEncode(item.Value) + "&"; str = str + item.Key + "=" + item.Value + "&"; } str = str.Trim('&'); str = str + secret; string sign = MD5Helper.Encrypt_MD5(str); result["sign_type"] = "MD5"; result["sign"] = sign; return(result); }