libsodium update: 1.0.0
[tomato.git] / release / src-rt-6.x.4708 / router / libsodium / test / default / core4.c
blob611d3928ad9c6845458f0df9ec0d5775c8253ea1
2 #define TEST_NAME "core4"
3 #include "cmptest.h"
5 unsigned char k[32] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6 12, 13, 14, 15, 16, 201, 202, 203, 204, 205, 206,
7 207, 208, 209, 210, 211, 212, 213, 214, 215, 216 };
9 unsigned char in[16] = { 101, 102, 103, 104, 105, 106, 107, 108,
10 109, 110, 111, 112, 113, 114, 115, 116 };
12 unsigned char c[16] = { 101, 120, 112, 97, 110, 100, 32, 51,
13 50, 45, 98, 121, 116, 101, 32, 107 };
15 unsigned char out[64];
17 int main(void)
19 int i;
21 crypto_core_salsa20(out, in, k, c);
22 for (i = 0; i < 64; ++i) {
23 if (i > 0) {
24 printf(",");
25 } else {
26 printf(" ");
28 printf("%3d", (unsigned int)out[i]);
29 if (i % 8 == 7) {
30 printf("\n");
33 return 0;