MCPcopy
hub / github.com/authlib/authlib / wrap

Method wrap

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

Source from the content-addressed store, hash-verified

33 return {}
34
35 def wrap(self, enc_alg, headers, key, preset=None):
36 cek = key.get_op_key("encrypt")
37 if len(cek) * 8 != enc_alg.CEK_SIZE:
38 raise ValueError('Invalid "cek" length')
39 return {"ek": b"", "cek": cek}
40
41 def unwrap(self, enc_alg, ek, headers, key):
42 cek = key.get_op_key("decrypt")

Callers

nothing calls this directly

Calls 1

get_op_keyMethod · 0.45

Tested by

no test coverage detected