diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-01 16:34:46 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-01 16:34:46 +0200 |
commit | d737d34b436f673173695c4c772f0ddef9fe7837 (patch) | |
tree | f6bf400809124d411eaff38fe2c9d24842c8d23a /libhashsum | |
parent | m fix (diff) | |
download | libhashsum-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.h | 16 |
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 |