diff options
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): |