diff options
author | lloyd <[email protected]> | 2010-06-30 17:30:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-30 17:30:23 +0000 |
commit | ce733a44c26d485af4e2466e14700cf8b5e9dd01 (patch) | |
tree | dad8d8b278032f70726a8911719593fc6f70798a /checks/bench.cpp | |
parent | 50a3fbc9fffbb9a6d9b7940f519726f71067503d (diff) |
Fix ECB benchmarking
Diffstat (limited to 'checks/bench.cpp')
-rw-r--r-- | checks/bench.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp index 5a729a04f..5ee50d89d 100644 --- a/checks/bench.cpp +++ b/checks/bench.cpp @@ -211,7 +211,9 @@ bool bench_algo(const std::string& algo, continue; filt->set_key(Botan::SymmetricKey(&buf[0], cipher_keylen)); - filt->set_iv(Botan::InitializationVector(&buf[0], cipher_ivlen)); + + if(filt->valid_iv_length(cipher_ivlen / 2)) + filt->set_iv(Botan::InitializationVector(&buf[0], cipher_ivlen)); Botan::Pipe pipe(filt, new Botan::BitBucket); pipe.start_msg(); |