17 std::vector<uint8_t> key(32, 0);
21 std::vector<uint8_t> in(buffersize, 0);
22 std::vector<uint8_t> out(buffersize, 0);
24 [&] {
ctx.Crypt(in.data(), out.data(), in.size()); });
static const uint64_t BUFFER_SIZE_LARGE
BENCHMARK(CHACHA20_64BYTES)
static void CHACHA20_256BYTES(benchmark::Bench &bench)
static void CHACHA20(benchmark::Bench &bench, size_t buffersize)
static const uint64_t BUFFER_SIZE_TINY
static void CHACHA20_1MB(benchmark::Bench &bench)
static void CHACHA20_64BYTES(benchmark::Bench &bench)
static const uint64_t BUFFER_SIZE_SMALL
A class for ChaCha20 256-bit stream cipher developed by Daniel J.
Main entry point to nanobench's benchmarking facility.
ANKERL_NANOBENCH(NODISCARD) std Bench & batch(T b) noexcept
Sets the batch size.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
Bench & unit(char const *unit)
Sets the operation unit.