Cartalyst\Sentinel\Hashing\NativeHasher::check PHP Method

check() public method

{@inheritDoc}
public check ( $value, $hashedValue )
    public function check($value, $hashedValue)
    {
        return password_verify($value, $hashedValue);
    }

Usage Example

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