| 1 | <?php |
||
| 8 | class PHPPasswordHasher implements PasswordHasherInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | */ |
||
| 13 | private $cost; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Constructor. |
||
| 17 | * |
||
| 18 | * @param int $cost |
||
| 19 | */ |
||
| 20 | public function __construct($cost = 12) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public function generateHash($password) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | public function compareWith($password, $raw) |
||
| 47 | } |
||
| 48 |