Skip to content

Commit ef2b23b

Browse files
committed
cleanup
1 parent e61c7a1 commit ef2b23b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/cryptojwt/jwk/okp.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,7 @@ def is_private_key(key) -> bool:
3434

3535

3636
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)
37+
return b64d(val.encode()) if isinstance(val, str) else b64d(val)
5038

5139

5240
class OKPKey(AsymmetricKey):

0 commit comments

Comments
 (0)