Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | class PasswordHasher implements Contract |
||
26 | { |
||
27 | /** |
||
28 | * Hash a given password. |
||
29 | * |
||
30 | * @param non-empty-string $password The password to hash |
||
|
|||
31 | * |
||
32 | * @return non-empty-string |
||
33 | */ |
||
34 | public function hashPassword(string $password): string |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Compare an plain text password with a given hashed password. |
||
44 | * |
||
45 | * @param string $password The plain text password |
||
46 | * @param string $hashedPassword The hashed password |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function confirmPassword(string $password, string $hashedPassword): bool |
||
55 |