summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Mitchell <richard.j.mitchell@gmail.com>2014-04-28 16:58:27 +0100
committerDwayne Litzenberger <dlitz@dlitz.net>2014-06-22 21:08:32 -0700
commit58de28a5d32bc10e15766e5a59f41b07397cc6cb (patch)
tree17cb7060a70ed01244aca3b62c9cd72453e9031e
parent629c26c21857f205b08211d7b1333eb5580c525d (diff)
downloadpycrypto-58de28a5d32bc10e15766e5a59f41b07397cc6cb.tar.gz
Fix speedtest run for ECB modes.
-rw-r--r--pct-speedtest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pct-speedtest.py b/pct-speedtest.py
index 4ce18be..c7b893a 100644
--- a/pct-speedtest.py
+++ b/pct-speedtest.py
@@ -186,6 +186,8 @@ class Benchmark:
initial_value=bytes_to_long(iv),
allow_wraparound=True)
cipher = module.new(key, module.MODE_CTR, counter=ctr)
+ elif mode==module.MODE_ECB:
+ cipher = module.new(key, module.MODE_ECB)
else:
cipher = module.new(key, mode, iv)