| 327 | |
| 328 | @pytest.mark.parametrize("jwe_package", JWE_256_BIT_OCT_PACKAGES) |
| 329 | def test_decrypt_oct_256_key_wrap(self, jwe_package): |
| 330 | headers = jwe.get_unverified_header(jwe_package) |
| 331 | if headers["alg"] not in ALGORITHMS.SUPPORTED: |
| 332 | pytest.skip("alg {} not supported".format(headers["alg"])) |
| 333 | if headers["enc"] not in ALGORITHMS.SUPPORTED: |
| 334 | pytest.skip("enc {} not supported".format(headers["enc"])) |
| 335 | key = OCT_256_BIT_KEY |
| 336 | actual = jwe.decrypt(jwe_package, key) |
| 337 | assert actual == b"Live long and prosper." |
| 338 | |
| 339 | def test_invalid_jwe_is_parse_error(self): |
| 340 | with pytest.raises(JWEParseError): |