diff options
author | Micah Anderson <micah@riseup.net> | 2014-08-11 13:49:21 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2014-08-11 13:49:21 -0400 |
commit | 2e59f9740a29439df7c7a56cf0ae83dec3081d31 (patch) | |
tree | d5e7c4e74c9a0f1ea999327d2e68b1dd27be00e0 /test/default/hash.c |
initial import of debian version from mentors0.6.1
Diffstat (limited to 'test/default/hash.c')
-rw-r--r-- | test/default/hash.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/default/hash.c b/test/default/hash.c new file mode 100644 index 0000000..c24f9c4 --- /dev/null +++ b/test/default/hash.c @@ -0,0 +1,16 @@ +#include <stdio.h> + +#define TEST_NAME "hash" +#include "cmptest.h" + +unsigned char x[] = "testing\n"; +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; +} |