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

Function test_ec_private_key

tests/jose/test_jwk.py:146–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145
146def test_ec_private_key():
147 # https://tools.ietf.org/html/rfc7520#section-3.2
148 obj = read_file_path("secp521r1-private.json")
149 key = ECKey.import_key(obj)
150 new_obj = key.as_dict(is_private=True)
151 assert new_obj["crv"] == obj["crv"]
152 assert base64_to_int(new_obj["x"]) == base64_to_int(obj["x"])
153 assert base64_to_int(new_obj["y"]) == base64_to_int(obj["y"])
154 assert base64_to_int(new_obj["d"]) == base64_to_int(obj["d"])
155
156
157def test_invalid_ec():

Callers

nothing calls this directly

Calls 4

read_file_pathFunction · 0.90
base64_to_intFunction · 0.90
import_keyMethod · 0.45
as_dictMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…