Skip to content

Commit acc8615

Browse files
authored
Merge pull request #76 from jschlyter/int_from_bytes
cryptography.utils.int_from_bytes deprecated
2 parents 545e53a + f3ede73 commit acc8615

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ python:
99
addons:
1010
apt:
1111
packages:
12-
-
12+
- rustc
13+
- cargo
1314
install:
1415
- pip install codecov
1516
- pip install tox tox-travis

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)