aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/speed.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-10 13:25:10 -0500
committerJack Lloyd <[email protected]>2016-11-10 13:25:10 -0500
commitb7ae8043e963467eb222a44f48d66a1df36d9371 (patch)
treef5ec4059e21d874404c60595568a4a3d4d7305c9 /src/cli/speed.cpp
parente6bf87b6b0d4d9c3877b79de53de58dc34a3acca (diff)
Add SHAKE-128 and SHAKE-256 as hash functions
Diffstat (limited to 'src/cli/speed.cpp')
-rw-r--r--src/cli/speed.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index 7fe2a3757..c89ae6046 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -347,7 +347,13 @@ class Speed final : public Command
{
using namespace std::placeholders;
- if(auto enc = Botan::get_cipher_mode(algo, Botan::ENCRYPTION))
+ if(Botan::HashFunction::providers(algo).size() > 0)
+ {
+ bench_providers_of<Botan::HashFunction>(
+ algo, provider, msec, buf_size,
+ std::bind(&Speed::bench_hash, this, _1, _2, _3, _4));
+ }
+ else if(auto enc = Botan::get_cipher_mode(algo, Botan::ENCRYPTION))
{
auto dec = Botan::get_cipher_mode(algo, Botan::DECRYPTION);
bench_cipher_mode(*enc, *dec, msec, buf_size);
@@ -364,12 +370,6 @@ class Speed final : public Command
algo, provider, msec, buf_size,
std::bind(&Speed::bench_stream_cipher, this, _1, _2, _3, _4));
}
- else if(Botan::HashFunction::providers(algo).size() > 0)
- {
- bench_providers_of<Botan::HashFunction>(
- algo, provider, msec, buf_size,
- std::bind(&Speed::bench_hash, this, _1, _2, _3, _4));
- }
else if(Botan::MessageAuthenticationCode::providers(algo).size() > 0)
{
bench_providers_of<Botan::MessageAuthenticationCode>(