public string buildSign(String timestamp, String method, String paramJson, String accessToken, String appKey, String appSecret) { var textParams = new Dictionary <string, string>(); textParams.Add("method", method); textParams.Add("app_key", appKey); textParams.Add("access_token", accessToken); textParams.Add("timestamp", timestamp); textParams.Add("format", "json"); textParams.Add("v", "1.0"); textParams.Add("sign_method", "md5"); textParams.Add("param_json", paramJson); return(SignDigest.SignTopRequest(textParams, appSecret)); }
internal bool Validate(string sign, IDictionary <string, string> paramDic) { var temSign = SignDigest.SignTopRequest(paramDic, secret); return(sign == temSign); }