| 1 | <?php |
||
| 18 | class PasswordVerifier implements VerifierInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * |
||
| 22 | * The hashing algorithm to use. |
||
| 23 | * |
||
| 24 | * @var string|int |
||
| 25 | * |
||
| 26 | */ |
||
| 27 | protected $algo; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * |
||
| 31 | * Constructor. |
||
| 32 | * |
||
| 33 | * @param string|int $algo The hashing algorithm to use. |
||
| 34 | * |
||
| 35 | */ |
||
| 36 | 12 | public function __construct($algo) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * |
||
| 43 | * Verifies a password against a hash. |
||
| 44 | * |
||
| 45 | * @param string $plaintext Plaintext password. |
||
| 46 | * |
||
| 47 | * @param string $hashvalue The comparison hash. |
||
| 48 | * |
||
| 49 | * @param array $extra Optional array if used by verify |
||
| 50 | * |
||
| 51 | * @return bool |
||
| 52 | * |
||
| 53 | */ |
||
| 54 | 5 | public function verify($plaintext, $hashvalue, array $extra = array()) |
|
| 62 | } |
||
| 63 |