diff options
| author | Arseny Smirnov <arseny30@gmail.com> | 2020-06-15 15:07:58 +0300 |
|---|---|---|
| committer | Arseny Smirnov <arseny30@gmail.com> | 2020-06-15 15:07:58 +0300 |
| commit | 7e5a08f272aa525ca0e2f5955fb2be324cfbac4a (patch) | |
| tree | 1586b3dc41daf48506748f86d671212d5ecab585 /benchmark/bench_crypto.cpp | |
| parent | a5b0f205d1628b63fc40a75717add62121261f95 (diff) | |
tdutils: new ige implementation
GitOrigin-RevId: c19b702e3cfcb1edb182839e67c410c7fc3edac5
Diffstat (limited to 'benchmark/bench_crypto.cpp')
| -rw-r--r-- | benchmark/bench_crypto.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmark/bench_crypto.cpp b/benchmark/bench_crypto.cpp index e861914c5..dc4472d64 100644 --- a/benchmark/bench_crypto.cpp +++ b/benchmark/bench_crypto.cpp @@ -127,8 +127,10 @@ class AesIgeBench : public td::Benchmark { void run(int n) override { td::MutableSlice data_slice(data, DATA_SIZE); + td::AesIgeState state; + state.init(as_slice(key), as_slice(iv), true); for (int i = 0; i < n; i++) { - td::aes_ige_encrypt(as_slice(key), as_slice(iv), data_slice, data_slice); + state.encrypt(data_slice, data_slice); } } }; @@ -257,8 +259,8 @@ class Crc64Bench : public td::Benchmark { int main() { td::init_openssl_threads(); td::bench(AesEcbBench()); - td::bench(AesCtrBench()); td::bench(AesIgeBench()); + td::bench(AesCtrBench()); td::bench(Pbkdf2Bench()); td::bench(RandBench()); |
