aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-24 12:31:57 +0200
committerMattias Andrée <maandree@kth.se>2024-08-24 12:31:57 +0200
commit42c1a78b51dfcbe8c71cbae05ce4a21fbc60e073 (patch)
treed2cf7534a7ce4ec31ee9c1abf82a4f7c4fa8175f /libhashsum.h
parentAdditional error conditions for libhashsum_init_hasher and libhashsum_init_hasher_from_string (diff)
downloadlibhashsum-42c1a78b51dfcbe8c71cbae05ce4a21fbc60e073.tar.gz
libhashsum-42c1a78b51dfcbe8c71cbae05ce4a21fbc60e073.tar.bz2
libhashsum-42c1a78b51dfcbe8c71cbae05ce4a21fbc60e073.tar.xz
Make it possible for libhashsum_state to grow in future versions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libhashsum.h')
-rw-r--r--libhashsum.h25
1 files changed, 16 insertions, 9 deletions
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
};