| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function init($algorithm, $path): void |
||
| 40 | { |
||
| 41 | $algorithm = strtolower( |
||
| 42 | preg_replace( |
||
| 43 | '/[^A-Za-z0-9]+/', |
||
| 44 | '', |
||
| 45 | $algorithm |
||
| 46 | ) |
||
| 47 | ); |
||
| 48 | |||
| 49 | if (false === ($this->context = @hash_init($algorithm))) { |
||
| 50 | $this->context = null; |
||
| 51 | |||
| 52 | throw SignatureException::lastError(); |
||
| 53 | } |
||
| 76 |