From e3aad82aa979f9a542cca54e1d8630f07391e621 Mon Sep 17 00:00:00 2001 From: "Sybren A. St?vel" Date: Sat, 30 Jul 2011 22:54:40 +0200 Subject: Using int() rather than long() --- rsa/transform.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rsa/transform.py') 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): -- cgit v1.2.1