Exemplo n.º 1
0
 /**
  * @param Request\AbstractRequest $request
  * @param string $securityKey
  *
  * @return string
  */
 public function generateHash(AbstractRequest $request, $securityKey)
 {
     $hashString = '';
     $requestData = $request->toArray();
     sort($this->hashParameters);
     foreach ($this->hashParameters as $key) {
         if (!array_key_exists($key, $requestData)) {
             continue;
         }
         $hashString .= $requestData[$key];
     }
     $hashString .= $securityKey;
     return $this->hashProvider->hash($hashString);
 }
Exemplo n.º 2
0
 /**
  * @param string $string
  *
  * @return string
  */
 public function hash($string)
 {
     return $this->hashProvider->hash($string);
 }