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

Method __init__

authlib/jose/drafts/_jwe_algorithms.py:21–31  ·  view source on GitHub ↗
(self, key_size=None)

Source from the content-addressed store, hash-verified

19
20 # https://datatracker.ietf.org/doc/html/draft-madden-jose-ecdh-1pu-04
21 def __init__(self, key_size=None):
22 if key_size is None:
23 self.name = "ECDH-1PU"
24 self.description = "ECDH-1PU in the Direct Key Agreement mode"
25 else:
26 self.name = f"ECDH-1PU+A{key_size}KW"
27 self.description = (
28 f"ECDH-1PU using Concat KDF and CEK wrapped with A{key_size}KW"
29 )
30 self.key_size = key_size
31 self.aeskw = AESAlgorithm(key_size)
32
33 def prepare_key(self, raw_data):
34 if isinstance(raw_data, self.ALLOWED_KEY_CLS):

Callers

nothing calls this directly

Calls 1

AESAlgorithmClass · 0.90

Tested by

no test coverage detected