We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1106d8a commit c6668eaCopy full SHA for c6668ea
Signature/Blake2b.php
@@ -8,6 +8,8 @@
8
use Jose\Component\Core\JWK;
9
use Jose\Component\Signature\Algorithm\MacAlgorithm;
10
use ParagonIE\ConstantTime\Base64UrlSafe;
11
+use RuntimeException;
12
+use function extension_loaded;
13
use function in_array;
14
use function is_string;
15
@@ -18,6 +20,13 @@ final class Blake2b implements MacAlgorithm
18
20
{
19
21
private const MINIMUM_KEY_LENGTH = 32;
22
23
+ public function __construct()
24
+ {
25
+ if (! extension_loaded('sodium')) {
26
+ throw new RuntimeException('Please install the Sodium extension');
27
+ }
28
29
+
30
public function allowedKeyTypes(): array
31
32
return ['oct'];
0 commit comments