Ejemplo n.º 1
0
        protected override void ProcessRequest(HttpWebRequest request, Dictionary <string, object> payload)
        {
            if (CanMakeAuthenticatedRequest(payload))
            {
                string url  = request.RequestUri.ToString();
                string sign = CryptoUtility.SHA512Sign(url, _exchangeSettings.Secret);

                request.Headers["apisign"] = sign;
            }
        }
Ejemplo n.º 2
0
 protected override void ProcessRequest(HttpWebRequest request, Dictionary <string, object> payload)
 {
     if (CanMakeAuthenticatedRequest(payload))
     {
         string form = GetFormForPayload(payload);
         request.Headers["Key"]  = PublicApiKey.ToUnsecureString();
         request.Headers["Sign"] = CryptoUtility.SHA512Sign(form, PrivateApiKey.ToUnsecureString());
         request.Method          = "POST";
         WriteFormToRequest(request, form);
     }
 }