summaryrefslogtreecommitdiff
path: root/rsa/transform.py
diff options
context:
space:
mode:
Diffstat (limited to 'rsa/transform.py')
-rw-r--r--rsa/transform.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/rsa/transform.py b/rsa/transform.py
index 0db546b..f2c9a65 100644
--- a/rsa/transform.py
+++ b/rsa/transform.py
@@ -32,11 +32,11 @@ def bytes2int(bytes):
>>> (((128 * 256) + 64) * 256) + 15
8405007
>>> bytes2int('\x80@\x0f')
- 8405007L
+ 8405007
"""
- return long(binascii.hexlify(bytes), 16)
+ return int(binascii.hexlify(bytes), 16)
def int2bytes(number, block_size=None):
r'''Converts a number to a string of bytes.
@@ -53,12 +53,12 @@ def int2bytes(number, block_size=None):
>>> int2bytes(123456789)
'\x07[\xcd\x15'
>>> bytes2int(int2bytes(123456789))
- 123456789L
+ 123456789
>>> int2bytes(123456789, 6)
'\x00\x00\x07[\xcd\x15'
>>> bytes2int(int2bytes(123456789, 128))
- 123456789L
+ 123456789
>>> int2bytes(123456789, 3)
Traceback (most recent call last):