Cartalyst\Sentinel\Hashing\WhirlpoolHasher::hash PHP Method

hash() public method

{@inheritDoc}
public hash ( $value )
    public function hash($value)
    {
        $salt = $this->createSalt();
        return $salt . hash('whirlpool', $salt . $value);
    }

Usage Example

 public function testSymbolsValue()
 {
     $hasher = new WhirlpoolHasher();
     $hashedValue = $hasher->hash('!"#$%^&*()-_,./:;<=>?@[]{}`~|');
     $this->assertTrue($hashedValue !== '!"#$%^&*()-_,./:;<=>?@[]{}`~|');
     $this->assertTrue($hasher->check('!"#$%^&*()-_,./:;<=>?@[]{}`~|', $hashedValue));
 }
WhirlpoolHasher