| 1 | <?php |
||
| 9 | final class DefaultPasswordHashStrategy implements IPasswordHashStrategy |
||
| 10 | { |
||
| 11 | use Nette\SmartObject; |
||
| 12 | |||
| 13 | /** @var array */ |
||
| 14 | private $options; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param array $options |
||
| 18 | */ |
||
| 19 | public function __construct(array $options = []) |
||
| 23 | |||
| 24 | /*********** interface \SixtyEightPublishers\User\Common\PasswordHashStrategy\IPasswordHashStrategy ***********/ |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function hash(string $password): string |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function needRehash(string $password): bool |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | public function verify(string $password, string $hash): bool |
||
| 49 | } |
||
| 50 |