diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-02 09:53:34 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-02 09:53:34 -0400 |
commit | e2967396ac73cb7410787886cdaf072a184ffc49 (patch) | |
tree | 527a74d25a4a0705fc641994fd35bfab22662034 /nacl/tests/hash3.c | |
parent | 8928c817df345f29aa0b194743595aa11bd6a8ba (diff) |
Added NaCl crypto library.
Diffstat (limited to 'nacl/tests/hash3.c')
-rw-r--r-- | nacl/tests/hash3.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nacl/tests/hash3.c b/nacl/tests/hash3.c new file mode 100644 index 00000000..10b89b90 --- /dev/null +++ b/nacl/tests/hash3.c | |||
@@ -0,0 +1,14 @@ | |||
1 | #include <stdio.h> | ||
2 | #include "crypto_hash_sha512.h" | ||
3 | |||
4 | unsigned char x[8] = "testing\n"; | ||
5 | unsigned char h[crypto_hash_sha512_BYTES]; | ||
6 | |||
7 | int main() | ||
8 | { | ||
9 | int i; | ||
10 | crypto_hash_sha512(h,x,sizeof x); | ||
11 | for (i = 0;i < crypto_hash_sha512_BYTES;++i) printf("%02x",(unsigned int) h[i]); | ||
12 | printf("\n"); | ||
13 | return 0; | ||
14 | } | ||