The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/libsodium/test/default/core4.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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

Cache object: ec71611ca785e35af6ca7a61b16b5842


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.