20 std::vector<std::byte> in(buffersize, {});
21 bench.
batch(in.size()).unit(
"byte").
run([&] {
static constexpr uint64_t BUFFER_SIZE_SMALL
static void POLY1305_64BYTES(benchmark::Bench &bench)
static void POLY1305(benchmark::Bench &bench, size_t buffersize)
static constexpr uint64_t BUFFER_SIZE_LARGE
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static constexpr unsigned KEYLEN
Length of the keys expected by the constructor.
static constexpr uint64_t BUFFER_SIZE_TINY
C++ wrapper with std::byte Span interface around poly1305_donna code.
static void POLY1305_256BYTES(benchmark::Bench &bench)
void Finalize(Span< std::byte > out) noexcept
Write authentication tag to 16-byte out.
static constexpr unsigned TAGLEN
Length of the output produced by Finalize().
Main entry point to nanobench's benchmarking facility.
Bench & batch(T b) noexcept
Sets the batch size.
BENCHMARK(POLY1305_64BYTES, benchmark::PriorityLevel::HIGH)
static void POLY1305_1MB(benchmark::Bench &bench)
Poly1305 & Update(Span< const std::byte > msg) noexcept
Process message bytes.