A modern, portable, easy to use crypto library.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
335 B

#define TEST_NAME "hash3"
#include "cmptest.h"
static unsigned char x[] = "testing\n";
static unsigned char h[crypto_hash_BYTES];
int
main(void)
{
size_t i;
crypto_hash(h, x, sizeof x - 1U);
for (i = 0; i < crypto_hash_BYTES; ++i) {
printf("%02x", (unsigned int) h[i]);
}
printf("\n");
return 0;
}