blob: 6b630ecec0255068c020eb6afd1eab1b731d719c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* Allocates and writes to a 64 kB object on the stack.
This must succeed. */
#include <string.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
char stk_obj[65536];
struct arc4 arc4;
arc4_init (&arc4, "foobar", 6);
memset (stk_obj, 0, sizeof stk_obj);
arc4_crypt (&arc4, stk_obj, sizeof stk_obj);
msg ("cksum: %lu", cksum (stk_obj, sizeof stk_obj));
}
|