aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-01 16:34:46 +0200
committerMattias Andrée <maandree@kth.se>2024-09-01 16:34:46 +0200
commitd737d34b436f673173695c4c772f0ddef9fe7837 (patch)
treef6bf400809124d411eaff38fe2c9d24842c8d23a /libhashsum
parentm fix (diff)
downloadlibhashsum-d737d34b436f673173695c4c772f0ddef9fe7837.tar.gz
libhashsum-d737d34b436f673173695c4c772f0ddef9fe7837.tar.bz2
libhashsum-d737d34b436f673173695c4c772f0ddef9fe7837.tar.xz
Add support for BLAKE2 (but not tree-hashing)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libhashsum')
-rw-r--r--libhashsum/internal.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/libhashsum/internal.h b/libhashsum/internal.h
index b75cdd9..e02a417 100644
--- a/libhashsum/internal.h
+++ b/libhashsum/internal.h
@@ -155,9 +155,23 @@ union libhashsum_state {
uint8_t buf[256];
char algostr[81];
} blake512; /* size = 449 */
+
+ struct {
+ struct libblake_blake2s_state s;
+ char algostr[130];
+ unsigned char buf[64];
+ unsigned char keybytes;
+ } blake2s; /* size = 243 */
+
+ struct {
+ struct libblake_blake2b_state s;
+ char algostr[226];
+ unsigned char buf[128];
+ unsigned char keybytes;
+ } blake2b; /* size = 451 */
#endif
- /* libblake: 48(2s), 96(2b), 144(2Xs), 276(2Xb) */
+ /* libblake: 144(2Xs), 276(2Xb) */
char max_size[1648];
#define libhashsum_init_hasher libhashsum_init_hasher__1648