Primo Committ
This commit is contained in:
34
vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php
vendored
Normal file
34
vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Hashing;
|
||||
|
||||
abstract class AbstractHasher
|
||||
{
|
||||
/**
|
||||
* Get information about the given hashed value.
|
||||
*
|
||||
* @param string $hashedValue
|
||||
* @return array
|
||||
*/
|
||||
public function info($hashedValue)
|
||||
{
|
||||
return password_get_info($hashedValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the given plain value against a hash.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $hashedValue
|
||||
* @param array $options
|
||||
* @return bool
|
||||
*/
|
||||
public function check($value, $hashedValue, array $options = [])
|
||||
{
|
||||
if (strlen($hashedValue) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return password_verify($value, $hashedValue);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user