summaryrefslogtreecommitdiff
path: root/include/ouroboros/hash.h
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-16 09:42:13 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-16 13:40:12 +0200
commitbc651653d50145a8ca3a09b7b1146bf3089ccf47 (patch)
treeb4c16263531b1b802fb867f3d26bf0fcb173fe28 /include/ouroboros/hash.h
parentffc4468030398955ec56dac17934b43adfeab68b (diff)
downloadouroboros-bc651653d50145a8ca3a09b7b1146bf3089ccf47.tar.gz
ouroboros-bc651653d50145a8ca3a09b7b1146bf3089ccf47.zip
lib: Add implementation for MD5 hashes
Diffstat (limited to 'include/ouroboros/hash.h')
-rw-r--r--include/ouroboros/hash.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/ouroboros/hash.h b/include/ouroboros/hash.h
index 4779a9a6..a94b37ee 100644
--- a/include/ouroboros/hash.h
+++ b/include/ouroboros/hash.h
@@ -24,11 +24,12 @@
#ifndef OUROBOROS_LIB_HASH_H
#define OUROBOROS_LIB_HASH_H
-#include <ouroboros/sha3.h>
#include <ouroboros/crc32.h>
+#include <ouroboros/md5.h>
+#include <ouroboros/sha3.h>
#define HASH_FMT "%02x%02x%02x%02x"
-#define HASH_VAL(hash) \
+#define HASH_VAL(hash) \
((*(unsigned int *) hash) & 0xFF000000) >> 24, \
((*(unsigned int *) hash) & 0x00FF0000) >> 16, \
((*(unsigned int *) hash) & 0x0000FF00) >> 8, \