]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/libsodium/test/default/hash3.c
MFV r362082:
[FreeBSD/FreeBSD.git] / sys / contrib / libsodium / test / default / hash3.c
1
2 #define TEST_NAME "hash3"
3 #include "cmptest.h"
4
5 static unsigned char x[] = "testing\n";
6 static unsigned char h[crypto_hash_BYTES];
7
8 int
9 main(void)
10 {
11     size_t i;
12
13     crypto_hash(h, x, sizeof x - 1U);
14     for (i = 0; i < crypto_hash_BYTES; ++i) {
15         printf("%02x", (unsigned int) h[i]);
16     }
17     printf("\n");
18
19     return 0;
20 }