Beispiel #1
0
 /**
  * @param         $parameters
  * @param         $accessKeySecret
  * @param iSigner $iSigner
  *
  * @return mixed
  */
 private function computeSignature($parameters, $accessKeySecret, $iSigner)
 {
     ksort($parameters);
     $canonicalQueryString = '';
     foreach ($parameters as $key => $value) {
         $canonicalQueryString .= '&' . $this->percentEncode($key) . '=' . $this->percentEncode($value);
     }
     $stringToSign = parent::getMethod() . '&%2F&' . $this->percentEncode(substr($canonicalQueryString, 1));
     $signature = $iSigner->signString($stringToSign, $accessKeySecret . "&");
     return $signature;
 }
 public function __construct($product, $version, $actionName)
 {
     parent::__construct($product, $version, $actionName);
     $this->setVersion($version);
     $this->initialize();
 }