MCPcopy
hub / github.com/authlib/authlib / unwrap

Method unwrap

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

Source from the content-addressed store, hash-verified

39 return {"ek": b"", "cek": cek}
40
41 def unwrap(self, enc_alg, ek, headers, key):
42 cek = key.get_op_key("decrypt")
43 if len(cek) * 8 != enc_alg.CEK_SIZE:
44 cek = secrets.token_bytes(enc_alg.CEK_SIZE // 8)
45 return cek
46
47
48class RSAAlgorithm(JWEAlgorithm):

Callers

nothing calls this directly

Calls 1

get_op_keyMethod · 0.45

Tested by

no test coverage detected