aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypto/yarrow/yhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto/yarrow/yhash.h')
-rw-r--r--src/lib/crypto/yarrow/yhash.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/crypto/yarrow/yhash.h b/src/lib/crypto/yarrow/yhash.h
index 579432f..98c4403 100644
--- a/src/lib/crypto/yarrow/yhash.h
+++ b/src/lib/crypto/yarrow/yhash.h
@@ -12,12 +12,12 @@
#define HASH_CTX SHS_INFO
-#define HASH_Init(x) shsinit(x)
-#define HASH_Update(x, buf, sz) shsupdate(x, (void*)buf, sz)
-#define HASH_Final(x, digest) do { \
- shsfinal(x); \
- memcpy(digest, (void *) x.digest, SHS_DIGESTSIZE); \
- } while(0;)
+#define HASH_Init(x) shsInit(x)
+#define HASH_Update(x, buf, sz) shsUpdate(x, (const void*)buf, sz)
+#define HASH_Final(x, tdigest) do { \
+ shsFinal(x); \
+ memcpy((tdigest), (void *) (x)->digest, SHS_DIGESTSIZE); \
+ } while(0)
#define HASH_DIGEST_SIZE SHS_DIGESTSIZE