aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/speed.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index 1e8c3135f..b29c8b9e9 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -1290,17 +1290,20 @@ class Speed final : public Command
Botan::BigInt x = 1;
+ Botan::FPE_FE1 fpe_fe1(n, 3, "HMAC(SHA-256)");
+ fpe_fe1.set_key(key);
+
while(enc_timer.under(runtime))
{
enc_timer.start();
- x = Botan::FPE::fe1_encrypt(n, x, key, tweak);
+ x = fpe_fe1.encrypt(x, tweak.data(), tweak.size());
enc_timer.stop();
}
for(size_t i = 0; i != enc_timer.events(); ++i)
{
dec_timer.start();
- x = Botan::FPE::fe1_decrypt(n, x, key, tweak);
+ x = fpe_fe1.decrypt(x, tweak.data(), tweak.size());
dec_timer.stop();
}