diff --git a/benchmarks/charand.c b/benchmarks/charand.c new file mode 100644 index 0000000..19625c6 --- /dev/null +++ b/benchmarks/charand.c @@ -0,0 +1,16 @@ +#include "chacha20.c" +#include +#include + +int main(void) +{ + uint64_t N = 1000000; + uint8_t* buf = malloc(N); + const uint8_t key[32] = {0}; + const uint8_t nonce[16] = {0}; + for (uint64_t i = 0; i < 1000; ++i) + { + cha_generate(buf, N, key, nonce); + } + free(buf); +}