| 1 | <?php |
||
| 12 | class Crypt |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Generate a hashed password string |
||
| 17 | * |
||
| 18 | * @param string $password |
||
| 19 | * @return bool|string |
||
| 20 | * @throws \Exception |
||
| 21 | */ |
||
| 22 | public function hashPassword(string $password) :string |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Verify a password |
||
| 29 | * |
||
| 30 | * @param string $password |
||
| 31 | * @param string $hash |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | public function verifyPassword(string $password, string $hash) :bool |
||
| 38 | |||
| 39 | } |