summaryrefslogtreecommitdiff
path: root/nacl/tests/hash.c
blob: 8de470aa712fa5934e85efb59e6ece0fb9d442b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include "crypto_hash.h"

unsigned char x[8] = "testing\n";
unsigned char h[crypto_hash_BYTES];

int main()
{
  int i;
  crypto_hash(h,x,sizeof x);
  for (i = 0;i < crypto_hash_BYTES;++i) printf("%02x",(unsigned int) h[i]);
  printf("\n");
  return 0;
}