We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e61c7a1 commit ef2b23bCopy full SHA for ef2b23b
src/cryptojwt/jwk/okp.py
@@ -34,19 +34,7 @@ def is_private_key(key) -> bool:
34
35
36
def deser(val):
37
- """
38
- Deserialize from a string representation of a long integer
39
- to the python representation of a long integer.
40
-
41
- :param val: The string representation of the long integer.
42
- :return: The long integer.
43
44
- if isinstance(val, str):
45
- _val = val.encode("utf-8")
46
- else:
47
- _val = val
48
49
- return b64d(_val)
+ return b64d(val.encode()) if isinstance(val, str) else b64d(val)
50
51
52
class OKPKey(AsymmetricKey):
0 commit comments