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/auth6.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 "auth6"
    3 #include "cmptest.h"
    4 
    5 /* "Test Case 2" from RFC 4231 */
    6 static unsigned char key[32] = "Jefe";
    7 static unsigned char c[]     = "what do ya want for nothing?";
    8 
    9 static unsigned char a[64];
   10 
   11 int
   12 main(void)
   13 {
   14     int i;
   15 
   16     crypto_auth_hmacsha512(a, c, sizeof c - 1U, key);
   17     for (i = 0; i < 64; ++i) {
   18         printf(",0x%02x", (unsigned int) a[i]);
   19         if (i % 8 == 7)
   20             printf("\n");
   21     }
   22     return 0;
   23 }

Cache object: 99de302e5d9953625c1e68734a9110d2


[ 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.