public IActionResult CreateSign() { var query = HttpUtility.ParseQueryString(string.Empty); query["appid"] = "sadfsdf"; //必传 应用id var sign = SignCommon.CreateSign("sadfsdf", query: query, body: new { a = 1, b = "1" }); query.Add("sign", sign); return(Ok(sign)); }
public IActionResult CreateSign() { Dictionary <string, string> queryDic = new Dictionary <string, string>(); queryDic.Add("appid", "111"); queryDic.Add("c", "1"); queryDic.Add("d", "1"); var sign = SignCommon.CreateSign("sadfsdf", queryDic: queryDic, body: new { a = 1, b = "1" }); queryDic.Add("sign", sign); return(Ok(sign)); }
public IActionResult ValidSign() { var query = HttpUtility.ParseQueryString(string.Empty); query["serverid"] = "1"; var sign = SignCommon.CreateSign("secret", query: query, body: new { a = 1, b = "1" }); query.Add("sign", sign); return(Ok(new ResponseResult { Result = sign })); }