(Arne Babenhauserheide)
2014-01-09: add performance test and output to tinyenc.c add performance test and output to tinyenc.c
diff --git a/examples/Makefile b/examples/Makefile --- a/examples/Makefile +++ b/examples/Makefile @@ -1,2 +1,2 @@ tinyenc : tinyenc.c - gcc -Wall tinyenc.c -o tinyenc + gcc -Wall -O3 tinyenc.c -o tinyenc diff --git a/examples/tinyenc.c b/examples/tinyenc.c --- a/examples/tinyenc.c +++ b/examples/tinyenc.c @@ -33,6 +33,14 @@ int main () { uint32_t v[] = {0, 5}; uint32_t k[] = {0, 0, 0, 9}; - encrypt(v, k); + int i; + // performance test + for (i=0; i<100000; i++) + { + encrypt(v, k); + printf("v1: %u\n", v[1]); + decrypt(v, k); + printf("v1: %u\n", v[1]); + } return 0; }