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

Method test_unwrap

tests/algorithms/test_AES.py:54–59  ·  view source on GitHub ↗
(self, alg, expected, hex_kek, hex_wrapped)

Source from the content-addressed store, hash-verified

52
53 @pytest.mark.parametrize("alg,expected,hex_kek,hex_wrapped", VECTORS)
54 def test_unwrap(self, alg, expected, hex_kek, hex_wrapped):
55 bin_kek = unhexlify(hex_kek)
56 bin_wrapped = unhexlify(hex_wrapped)
57 aes_key = CryptographyAESKey(bin_kek, alg)
58 actual = hexlify(aes_key.unwrap_key(bin_wrapped)).upper()
59 assert actual == expected

Callers

nothing calls this directly

Calls 2

unwrap_keyMethod · 0.95
CryptographyAESKeyClass · 0.90

Tested by

no test coverage detected