@@ 49-58 (lines=10) @@ | ||
46 | ) |
|
47 | ); |
|
48 | ||
49 | if($spec->getAlg()->getString() !== $spec->getRecipientKey()->getAlgorithm()->getString()) |
|
50 | throw new InvalidJWKAlgorithm |
|
51 | ( |
|
52 | sprintf |
|
53 | ( |
|
54 | 'mismatch between algorithm intended for use with the key %s and the cryptographic algorithm used to encrypt or determine the value of the CEK %s', |
|
55 | $spec->getAlg()->getString(), |
|
56 | $spec->getRecipientKey()->getAlgorithm()->getString() |
|
57 | ) |
|
58 | ); |
|
59 | ||
60 | $header = new JWEJOSEHeader |
|
61 | ( |
@@ 48-57 (lines=10) @@ | ||
45 | ) |
|
46 | ); |
|
47 | ||
48 | if($spec->getAlg()->getString() !== $spec->getKey()->getAlgorithm()->getString()) |
|
49 | throw new InvalidJWKAlgorithm |
|
50 | ( |
|
51 | sprintf |
|
52 | ( |
|
53 | 'mismatch between algorithm intended for use with the key %s and the cryptographic algorithm used to secure the JWS %s', |
|
54 | $spec->getAlg()->getString(), |
|
55 | $spec->getKey()->getAlgorithm()->getString() |
|
56 | ) |
|
57 | ); |
|
58 | ||
59 | $header = new JOSEHeader |
|
60 | ( |