Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Hashing;
4
 
5
abstract class AbstractHasher
6
{
7
    /**
8
     * Get information about the given hashed value.
9
     *
10
     * @param  string  $hashedValue
11
     * @return array
12
     */
13
    public function info($hashedValue)
14
    {
15
        return password_get_info($hashedValue);
16
    }
17
 
18
    /**
19
     * Check the given plain value against a hash.
20
     *
21
     * @param  string  $value
22
     * @param  string|null  $hashedValue
23
     * @param  array  $options
24
     * @return bool
25
     */
26
    public function check($value, $hashedValue, array $options = [])
27
    {
28
        if (is_null($hashedValue) || strlen($hashedValue) === 0) {
29
            return false;
30
        }
31
 
32
        return password_verify($value, $hashedValue);
33
    }
34
}