libsodium 1.0.8
[tomato.git] / release / src / router / libsodium / test / default / auth6.c
blob4f63fece64083813d414e1f6a2ab0420d321cf09
2 #define TEST_NAME "auth6"
3 #include "cmptest.h"
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?";
9 static unsigned char a[64];
11 int main(void)
13 int i;
15 crypto_auth_hmacsha512(a, c, sizeof c - 1U, key);
16 for (i = 0; i < 64; ++i) {
17 printf(",0x%02x", (unsigned int)a[i]);
18 if (i % 8 == 7)
19 printf("\n");
21 return 0;