Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function check(string $value, string $hashedValue, array $options = []): bool |
||
29 | { |
||
30 | if ($hashedValue === '') { |
||
31 | return false; |
||
32 | } |
||
33 | |||
34 | if ($this->verifyAlgorithm && ! $this->isUsingCorrectAlgorithm($hashedValue)) { |
||
35 | throw new RuntimeException("Ce mot de passe n'utilise pas l'algorithme Argon2id."); |
||
36 | } |
||
37 | |||
38 | return password_verify($value, $hashedValue); |
||
39 | } |
||
57 |