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