1 | <?php |
||
2 | |||
3 | |||
4 | namespace App\Libraries\ShaHash; |
||
5 | |||
6 | |||
7 | use Illuminate\Contracts\Hashing\Hasher as HasherContract; |
||
8 | use Illuminate\Hashing\HashManager; |
||
9 | |||
10 | class SHAHasher extends HashManager implements HasherContract |
||
11 | { |
||
12 | |||
13 | |||
14 | public function check($value, $hashedValue, array $options = []) |
||
15 | { |
||
16 | return password_verify ($value , $hashedValue); |
||
17 | } |
||
18 | |||
19 | |||
20 | public function make($value, array $options = []) |
||
21 | { |
||
22 | return password_hash($value,PASSWORD_DEFAULT,$options); |
||
23 | } |
||
24 | |||
25 | |||
26 | |||
27 | |||
28 | public function needsRehash($hashedValue, array $options = []) |
||
29 | { |
||
30 | return password_needs_rehash($hashedValue,$options); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
31 | } |
||
32 | |||
33 | |||
34 | public function info($hashedValue) |
||
35 | { |
||
36 | // TODO: Implement info() method. |
||
37 | return $hashedValue; |
||
38 | } |
||
39 | |||
40 | } |
||
41 |