- hash_hmac: documentation ( source)
- hash: documentation ( source)
<?php
$class = 'UserBundle\Selbstsucht';
$username = 'voadi';
$expires = '1450869565';
$password = '782153';
$hash = hash('sha256', $class.$username.$expires.$password.$this->getKey());
$hashHmac = hash_hmac('sha256', $class.$username.$expires.$password, $this->getKey());
echo $hash;
echo $hasHmac;