aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/common.h b/common.h
index 903a0e9..a13e9c8 100644
--- a/common.h
+++ b/common.h
@@ -15,6 +15,18 @@
#if defined(SUPPORT_KECCAK) || defined(SUPPORT_SHA3) || defined(SUPPORT_SHAKE) || defined(SUPPORT_RAWSHAKE)
# define LIBHASHSUM_INCLUDE_LIBKECCAK_STATE
#endif
+#if defined(SUPPORT_BLAKE224) || defined(SUPPORT_BLAKE256)
+# define SUPPORT_BLAKES
+#endif
+#if defined(SUPPORT_BLAKE384) || defined(SUPPORT_BLAKE512)
+# define SUPPORT_BLAKEB
+#endif
+#if defined(SUPPORT_BLAKES) || defined(SUPPORT_BLAKEB)
+# define SUPPORT_BLAKE
+#endif
+#if defined(SUPPORT_BLAKE)
+# define LIBHASHSUM_INCLUDE_LIBBLAKE_STATE
+#endif
#include "libhashsum.h"
#include <ctype.h>
@@ -179,8 +191,8 @@ run_tests(const char *name, enum libhashsum_algorithm algorithm, size_t hash_siz
*p++ = 'b';
*p++ = '"';
while (bits--) {
- *p++ = "01"[(extra_bit >> 7) & 1U];
- extra_bit <<= 1;
+ *p++ = "01"[extra_bit & 1U];
+ extra_bit >>= 1;
}
*p++ = '"';
*p = '\0';