MCPcopy Index your code
hub / github.com/authlib/authlib / wrap

Method wrap

authlib/jose/rfc7518/jwe_algs.py:109–114  ·  view source on GitHub ↗
(self, enc_alg, headers, key, preset=None)

Source from the content-addressed store, hash-verified

107 return {"ek": ek, "cek": cek}
108
109 def wrap(self, enc_alg, headers, key, preset=None):
110 if preset and "cek" in preset:
111 cek = preset["cek"]
112 else:
113 cek = enc_alg.generate_cek()
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")

Callers

nothing calls this directly

Calls 2

wrap_cekMethod · 0.95
generate_cekMethod · 0.80

Tested by

no test coverage detected