diff options
author | lloyd <[email protected]> | 2013-03-16 17:44:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-03-16 17:44:46 +0000 |
commit | 6982cf184cf4a51a54d781aba8f8a4e05d25a49c (patch) | |
tree | c97da2d236f83e25f2b636c7635b29f65283150d /checks/bench.cpp | |
parent | 3b6eac4497ecf68053d28dd7f84056ee469129d7 (diff) | |
parent | 09f961ac72d2a1266156ac98e85248610789763c (diff) |
propagate from branch 'net.randombit.botan' (head 039c91aa543bad85f227e8127ed048f9005e2fa0)
to branch 'net.randombit.botan.aead-modes' (head 97d8d24b545f18084e39bf928c174c45efbb63bd)
Diffstat (limited to 'checks/bench.cpp')
-rw-r--r-- | checks/bench.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp index 5faba00db..f7ddc5650 100644 --- a/checks/bench.cpp +++ b/checks/bench.cpp @@ -76,6 +76,7 @@ const std::string algos[] = { "AES-128/CBC/CTS", "AES-128/CTR-BE", "AES-128/EAX", + "AES-128/OCB", "AES-128/OFB", "AES-128/XTS", "AES-128/CFB(128)", @@ -202,10 +203,13 @@ bool bench_algo(const std::string& algo, } size_t cipher_keylen = proto_cipher->maximum_keylength(); - const size_t cipher_ivlen = proto_cipher->block_size(); + size_t cipher_ivlen = proto_cipher->block_size(); + // hacks! if(algo_parts[1] == "XTS") - cipher_keylen *= 2; // hack! + cipher_keylen *= 2; + if(algo_parts[1] == "OCB") + cipher_ivlen -= 1; std::vector<byte> buf(16 * 1024); rng.randomize(&buf[0], buf.size()); |