Skip to content

Commit d4a2428

Browse files
committed
cryptography.utils.int_from_bytes deprecated, use int.from_bytes instead
1 parent 545e53a commit d4a2428

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/cryptojwt/jws/dsa.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from cryptography.hazmat.primitives.asymmetric import ec
44
from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature
55
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature
6-
from cryptography.utils import int_from_bytes
76
from cryptography.utils import int_to_bytes
87

98
from ..exception import BadSignature
@@ -102,6 +101,6 @@ def _split_raw_signature(sig):
102101
:return: A 2-tuple
103102
"""
104103
c_length = len(sig) // 2
105-
r = int_from_bytes(sig[:c_length], byteorder="big")
106-
s = int_from_bytes(sig[c_length:], byteorder="big")
104+
r = int.from_bytes(sig[:c_length], byteorder="big")
105+
s = int.from_bytes(sig[c_length:], byteorder="big")
107106
return r, s

0 commit comments

Comments
 (0)