aboutsummaryrefslogtreecommitdiffstats
path: root/checks/bench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'checks/bench.cpp')
-rw-r--r--checks/bench.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp
index 3deff5136..b5e8e82f8 100644
--- a/checks/bench.cpp
+++ b/checks/bench.cpp
@@ -176,11 +176,14 @@ bool bench_algo(const std::string& algo,
size_t cipher_keylen = proto_cipher->maximum_keylength();
size_t cipher_ivlen = proto_cipher->block_size();
- // hacks!
+ // hacks! (cipher_ivlen = transform->default_nonce_size())
+
if(algo_parts[1] == "XTS")
cipher_keylen *= 2;
if(algo_parts[1] == "OCB")
cipher_ivlen -= 1;
+ if(algo_parts[1] == "ECB")
+ cipher_ivlen = 0;
std::vector<byte> buf(16 * 1024);
rng.randomize(&buf[0], buf.size());