| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 26 | public function sign(string $message): string |
||
| 27 | { |
||
| 28 | $signature = ''; |
||
| 29 | |||
| 30 | if (openssl_sign($message, $signature, $this->privateKey->getResource(), $this->algorithm()) === true) { |
||
| 31 | return $signature; |
||
| 32 | } |
||
| 33 | |||
| 34 | throw new SigningException(openssl_error_string() ?: "OpenSSL cannot sign the token."); |
||
| 35 | } |
||
| 50 |