Benchmark for cha random too.

This commit is contained in:
2023-11-21 23:45:49 +00:00
parent 570b071d36
commit d2a0433344
+16
View File
@@ -0,0 +1,16 @@
#include "chacha20.c"
#include <stdio.h>
#include <stdlib.h>
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);
}