private Url DecodeN(string body, Url url) { if (!url.QueryParams.TryGetFirst("n", out var n)) { return(url); } // Option 1 var(code, argumentName) = DecodeUtils.ExtractNCode(body); var nDecoded = Evaluate(code, argumentName, n); return(url.SetQueryParam("n", nDecoded)); }
private Url DecipherSignature(string body, Url url) { if (!url.QueryParams.TryGetFirst("s", out var s)) { return(url); } var signatureParameter = url.QueryParams.FirstOrDefault("sp") as string ?? "signature"; // Option 1 var(code, argumentName) = DecodeUtils.ExtractDecipher(body); var signatureValue = Evaluate(code, argumentName, s); return(url.SetQueryParam(signatureParameter, signatureValue)); }