MCPcopy Create free account
hub / github.com/mpdavis/python-jose / test_decrypt_oct_128_key_wrap

Method test_decrypt_oct_128_key_wrap

tests/test_jwe.py:307–315  ·  view source on GitHub ↗
(self, jwe_package)

Source from the content-addressed store, hash-verified

305
306 @pytest.mark.parametrize("jwe_package", JWE_128_BIT_OCT_PACKAGES)
307 def test_decrypt_oct_128_key_wrap(self, jwe_package):
308 key = OCT_128_BIT_KEY
309 headers = jwe.get_unverified_header(jwe_package)
310 if headers["alg"] not in ALGORITHMS.SUPPORTED:
311 pytest.skip("alg {} not supported".format(headers["alg"]))
312 if headers["enc"] not in ALGORITHMS.SUPPORTED:
313 pytest.skip("enc {} not supported".format(headers["enc"]))
314 actual = jwe.decrypt(jwe_package, key)
315 assert actual == b"Live long and prosper."
316
317 @pytest.mark.parametrize("jwe_package", JWE_192_BIT_OCT_PACKAGES)
318 def test_decrypt_oct_192_key_wrap(self, jwe_package):

Callers

nothing calls this directly

Calls 1

decryptMethod · 0.45

Tested by

no test coverage detected