1 | <?php declare(strict_types=1); |
||
29 | class Hasher implements HasherInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var int |
||
33 | */ |
||
34 | private $algorithm; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | private $options; |
||
40 | |||
41 | /** |
||
42 | * @param int $algorithm |
||
43 | * @param int $cost |
||
44 | */ |
||
45 | 2 | public function __construct(int $algorithm = PASSWORD_DEFAULT, int $cost = 10) |
|
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | 1 | public function hash(string $password): string |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | 1 | public function verify(string $password, string $hash): bool |
|
74 | } |
||
75 |