From 42c1a78b51dfcbe8c71cbae05ce4a21fbc60e073 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 24 Aug 2024 12:31:57 +0200 Subject: Make it possible for libhashsum_state to grow in future versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'libhashsum.h') diff --git a/libhashsum.h b/libhashsum.h index 541f4e6..67f27b4 100644 --- a/libhashsum.h +++ b/libhashsum.h @@ -163,7 +163,7 @@ union libhashsum_state { unsigned char mz[16]; unsigned char sum[16]; unsigned t; - } md2; + } md2; /* size = [82, 88] */ struct { union { @@ -175,7 +175,7 @@ union libhashsum_state { uint8_t m8[64]; } m; uint64_t count; - } md4; + } md4; /* size = 70 */ struct { union { @@ -185,7 +185,7 @@ union libhashsum_state { uint8_t m[64]; uint32_t w[16]; uint64_t count; - } md5; + } md5; /* size = 152 */ struct { union { @@ -197,7 +197,7 @@ union libhashsum_state { uint8_t m8[64]; } m; uint64_t count; - } ripemd_128; + } ripemd_128; /* size = 88 */ struct { union { @@ -211,7 +211,7 @@ union libhashsum_state { uint32_t w1[5]; uint32_t w2[5]; uint64_t count; - } ripemd_160; + } ripemd_160; /* size = 132 */ struct { union { @@ -223,7 +223,7 @@ union libhashsum_state { uint8_t m8[64]; } m; uint64_t count; - } ripemd_256; + } ripemd_256; /* size = 104 */ struct { union { @@ -237,17 +237,24 @@ union libhashsum_state { uint32_t w1[5]; uint32_t w2[5]; uint64_t count; - } ripemd_320; + } ripemd_320; /* size = 152 */ struct { struct libsha1_state s; uint8_t sum[20]; - } sha0, sha1; + } sha0, sha1; /* size = [432, 440] */ struct { struct libsha2_state s; uint8_t sum[64]; - } sha2; + } sha2; /* size = [1612, 1624] */ + + /* libkeccak: size = [248, 288] */ + /* libblake: size = 56(s), 112(b), 48(2s), 96(2b), 144(2Xs), 276(2Xb) */ + + char max_size[1648]; +#define libhashsum_init_hasher libhashsum_init_hasher__1648 +#define libhashsum_init_hasher_from_string libhashsum_init_hasher_from_string__1648 }; -- cgit v1.2.3-70-g09d2