diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-12-13 11:09:35 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-12-13 12:09:35 -0500 |
commit | 874445aea9e2d07a94444855ccfeaa3082de26a9 (patch) | |
tree | 8d3c2c0040ad6d5ae6fba72a76061063aa3f5360 /src | |
parent | cd77364230c208d500c84da38c7419e5f573e2f2 (diff) | |
download | cryptography-874445aea9e2d07a94444855ccfeaa3082de26a9.tar.gz cryptography-874445aea9e2d07a94444855ccfeaa3082de26a9.tar.bz2 cryptography-874445aea9e2d07a94444855ccfeaa3082de26a9.zip |
fix a regression in int_from_bytes (#3316)
* fix a regression in int_from_bytes
* add a new test file
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py index 6fda2cc1..f16b7efa 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -47,7 +47,8 @@ else: assert byteorder == 'big' assert not signed - return int(data.encode('hex'), 16) + # call bytes() on data to allow the use of bytearrays + return int(bytes(data).encode('hex'), 16) def int_to_bytes(integer, length=None): |