Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
28 | 1 | public function verify(string $signature, string $baseString, string $key): bool |
|
29 | { |
||
30 | 1 | $expectedSignature = $this->generateSignature($baseString, $key); |
|
31 | 1 | if (empty($signature) || empty($expectedSignature)) { |
|
32 | return false; |
||
33 | } |
||
34 | |||
35 | 1 | return strcmp($expectedSignature, $signature) === 0; |
|
36 | } |
||
48 |