Пример #1
0
 /**
  * @param $string
  *
  * @return Hash
  */
 public function hash(string $string) : Hash
 {
     $hash = new Hash();
     $hash->setAlgorithm($this->getAlgorithm());
     $value = hash_hmac($this->getAlgorithm(), $string, $this->getSecret(), true);
     $hash->setValue($value);
     return $hash;
 }