summaryrefslogtreecommitdiff
path: root/nacl/tests/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/tests/hash.c')
-rw-r--r--nacl/tests/hash.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/nacl/tests/hash.c b/nacl/tests/hash.c
new file mode 100644
index 00000000..8de470aa
--- /dev/null
+++ b/nacl/tests/hash.c
@@ -0,0 +1,14 @@
1#include <stdio.h>
2#include "crypto_hash.h"
3
4unsigned char x[8] = "testing\n";
5unsigned char h[crypto_hash_BYTES];
6
7int main()
8{
9 int i;
10 crypto_hash(h,x,sizeof x);
11 for (i = 0;i < crypto_hash_BYTES;++i) printf("%02x",(unsigned int) h[i]);
12 printf("\n");
13 return 0;
14}