| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function verify($signature, $securedInput, $key) |
||
| 52 | { |
||
| 53 | if (null == $key || trim($key) === '') { |
||
| 54 | throw new JoseJwtException('Hmac key can not be empty'); |
||
| 55 | } |
||
| 56 | |||
| 57 | $calculatedSignature = hash_hmac($this->hashMethod, $securedInput, $key, true); |
||
| 58 | |||
| 59 | return $signature === $calculatedSignature; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |