1 /* Shuffles a 128 kB data buffer 10 times, printing the checksum
5 #include "tests/arc4.h"
6 #include "tests/cksum.h"
8 #include "tests/main.h"
10 #define SIZE (128 * 1024)
12 static char buf[SIZE];
20 for (i = 0; i < sizeof buf; i++)
22 msg ("init: cksum=%lu", cksum (buf, sizeof buf));
24 /* Shuffle repeatedly. */
25 for (i = 0; i < 10; i++)
27 shuffle (buf, sizeof buf, 1);
28 msg ("shuffle %zu: cksum=%lu", i, cksum (buf, sizeof buf));