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_get_algorithm_from_string.c | |
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 '')
-rw-r--r-- | libhashsum_get_algorithm_from_string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libhashsum_get_algorithm_from_string.c b/libhashsum_get_algorithm_from_string.c index 9740510..07d97e5 100644 --- a/libhashsum_get_algorithm_from_string.c +++ b/libhashsum_get_algorithm_from_string.c @@ -97,6 +97,10 @@ libhashsum_get_algorithm_from_string(enum libhashsum_algorithm *algorithm_out, c *algorithm_out = LIBHASHSUM_BLAKE384; else if (equiv(algorithm, "BLAKE-512[]") || equiv(algorithm, "B512[]")) *algorithm_out = LIBHASHSUM_BLAKE512; + else if (equiv(algorithm, "BLAKE-2s[]") || equiv(algorithm, "B2s[]")) + *algorithm_out = LIBHASHSUM_BLAKE2S; + else if (equiv(algorithm, "BLAKE-2b[]") || equiv(algorithm, "B2b[]")) + *algorithm_out = LIBHASHSUM_BLAKE2B; else return 0; return 1; |