Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Identity\Application\Service; |
| 6 | |
| 7 | use App\Identity\Domain\ValueObject\HashedPassword; |
| 8 | |
| 9 | /** |
| 10 | * Port for turning a plaintext password into a HashedPassword and verifying one. |
| 11 | * Hashing is an infrastructure concern; the application depends on this contract only. |
| 12 | */ |
| 13 | interface PasswordHasher |
| 14 | { |
| 15 | public function hash(string $plainPassword): HashedPassword; |
| 16 | |
| 17 | public function verify(HashedPassword $hashedPassword, string $plainPassword): bool; |
| 18 | } |