diff options
Diffstat (limited to 'include/ouroboros/hash.h')
-rw-r--r-- | include/ouroboros/hash.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/ouroboros/hash.h b/include/ouroboros/hash.h index 6b0087ce..c44c2c8a 100644 --- a/include/ouroboros/hash.h +++ b/include/ouroboros/hash.h @@ -42,7 +42,8 @@ enum hash_algo { #define HASH_FMT32 "%02x%02x%02x%02x" #define HASH_VAL32(hash) \ - (hash)[0], (hash)[1], (hash)[2], (hash)[3] + ((uint8_t *) hash)[0], ((uint8_t *) hash)[1], \ + ((uint8_t *) hash)[2], ((uint8_t *) hash)[3] #define HASH_FMT64 HASH_FMT32 HASH_FMT32 #define HASH_VAL64(hash64) \ @@ -52,6 +53,10 @@ enum hash_algo { #define HASH_VAL128(hash128) \ HASH_VAL64(hash128), HASH_VAL64(hash128 + 8) +#define HASH_FMT192 HASH_FMT128 HASH_FMT64 +#define HASH_VAL192(hash192) \ + HASH_VAL128(hash192), HASH_VAL64(hash192 + 16) + #define HASH_FMT224 HASH_FMT128 HASH_FMT64 HASH_FMT32 #define HASH_VAL224(hash224) \ HASH_VAL128(hash224), HASH_VAL64(hash224 + 16), \ |