diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-30 22:54:40 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-30 22:54:40 +0200 |
commit | c5aea514a0fc8e9496f16dd212c314322965c780 (patch) | |
tree | 69f137d3fba61822b8cfc3dbeb016ae1e296b75a /rsa/transform.py | |
parent | 5524a39f4114430ac4dee2f81fc436ac3b3a815b (diff) | |
download | rsa-git-c5aea514a0fc8e9496f16dd212c314322965c780.tar.gz |
Using int() rather than long()
Diffstat (limited to 'rsa/transform.py')
-rw-r--r-- | rsa/transform.py | 8 |
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): |