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

Method wrap_cek

authlib/jose/rfc7518/jwe_algs.py:103–107  ·  view source on GitHub ↗
(self, cek, key)

Source from the content-addressed store, hash-verified

101 raise ValueError(f"A key of size {self.key_size} bits is required.")
102
103 def wrap_cek(self, cek, key):
104 op_key = key.get_op_key("wrapKey")
105 self._check_key(op_key)
106 ek = aes_key_wrap(op_key, cek, default_backend())
107 return {"ek": ek, "cek": cek}
108
109 def wrap(self, enc_alg, headers, key, preset=None):
110 if preset and "cek" in preset:

Callers 3

wrapMethod · 0.95
_wrap_cekMethod · 0.80

Calls 2

_check_keyMethod · 0.95
get_op_keyMethod · 0.45