MCPcopy Create free account
hub / github.com/authlib/authlib / unwrap

Method unwrap

authlib/jose/rfc7518/jwe_algs.py:116–122  ·  view source on GitHub ↗
(self, enc_alg, ek, headers, key)

Source from the content-addressed store, hash-verified

114 return self.wrap_cek(cek, key)
115
116 def unwrap(self, enc_alg, ek, headers, key):
117 op_key = key.get_op_key("unwrapKey")
118 self._check_key(op_key)
119 cek = aes_key_unwrap(op_key, ek, default_backend())
120 if len(cek) * 8 != enc_alg.CEK_SIZE:
121 cek = secrets.token_bytes(enc_alg.CEK_SIZE // 8)
122 return cek
123
124
125class AESGCMAlgorithm(JWEAlgorithm):

Callers

nothing calls this directly

Calls 2

_check_keyMethod · 0.95
get_op_keyMethod · 0.45

Tested by

no test coverage detected