diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-16 09:37:46 -0800 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-16 09:44:35 -0800 |
commit | 3ba082f25a655334f0fb25c9fbaf688fe7a13186 (patch) | |
tree | fe2bcf7e6623c9fd5404d8b71cf8e5148ea4293c | |
parent | 109aae13b378a87c344de05fd868653397ed2ad7 (diff) | |
download | pycrypto-3ba082f25a655334f0fb25c9fbaf688fe7a13186.tar.gz |
pct-speedtest.py: Python 3 compatibility
-rw-r--r-- | pct-speedtest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pct-speedtest.py b/pct-speedtest.py index 9763f09..d2216b9 100644 --- a/pct-speedtest.py +++ b/pct-speedtest.py @@ -59,7 +59,7 @@ class Benchmark: bytes = bytes_per_block * blocks data = self.random_data(bytes) retval = [] - for i in xrange(blocks): + for i in range(blocks): p = i * bytes_per_block retval.append(data[p:p+bytes_per_block]) return retval @@ -172,9 +172,9 @@ class Benchmark: def run(self): pubkey_specs = [ - ("RSA(1024)", RSA, 1024/8), - ("RSA(2048)", RSA, 2048/8), - ("RSA(4096)", RSA, 4096/8), + ("RSA(1024)", RSA, int(1024/8)), + ("RSA(2048)", RSA, int(2048/8)), + ("RSA(4096)", RSA, int(4096/8)), ] block_specs = [ ("DES", DES, 8), |