From d737d34b436f673173695c4c772f0ddef9fe7837 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 1 Sep 2024 16:34:46 +0200 Subject: Add support for BLAKE2 (but not tree-hashing) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum_get_algorithm_from_string.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libhashsum_get_algorithm_from_string.c') 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; -- cgit v1.2.3-70-g09d2