diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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'; |