2 #include "tests/arc4.h"
4 #include "tests/main.h"
6 const char *test_name = "child-linear";
8 #define SIZE (128 * 1024)
12 main (int argc, char *argv[])
14 const char *key = argv[argc - 1];
19 arc4_init (&arc4, key, strlen (key));
20 arc4_crypt (&arc4, buf, SIZE);
22 /* Decrypt back to zeros. */
23 arc4_init (&arc4, key, strlen (key));
24 arc4_crypt (&arc4, buf, SIZE);
26 /* Check that it's all zeros. */
27 for (i = 0; i < SIZE; i++)
29 fail ("byte %zu != 0", i);