12 static const uint64_t BUFFER_SIZE_TINY = 64;
13 static const uint64_t BUFFER_SIZE_SMALL = 256;
14 static const uint64_t BUFFER_SIZE_LARGE = 1024*1024;
18 std::vector<uint8_t> key(32,0);
19 ChaCha20 ctx(key.data(), key.size());
22 std::vector<uint8_t> in(buffersize,0);
23 std::vector<uint8_t> out(buffersize,0);
25 ctx.Crypt(in.data(), out.data(), in.size());
31 CHACHA20(state, BUFFER_SIZE_TINY);
36 CHACHA20(state, BUFFER_SIZE_SMALL);
41 CHACHA20(state, BUFFER_SIZE_LARGE);
BENCHMARK(CHACHA20_64BYTES, 500000)
A class for ChaCha20 256-bit stream cipher developed by Daniel J.