From 3454e0328d57f57852bf12d698b6b4a4736d0719 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 20 May 2026 20:29:04 +0200 Subject: Prepare for supporting custom algorithms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- librecrypt_settings_prefix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'librecrypt_settings_prefix.c') diff --git a/librecrypt_settings_prefix.c b/librecrypt_settings_prefix.c index df1c56a..c8fed53 100644 --- a/librecrypt_settings_prefix.c +++ b/librecrypt_settings_prefix.c @@ -8,7 +8,7 @@ librecrypt_settings_prefix(const char *hash, size_t *hashsize_out, void *reserve { size_t i, len, ret = 0u; size_t last_offset = 0u; - const struct algorithm *algo; + const struct librecrypt_algorithm *algo; uintmax_t hashsize; (void) reserved; @@ -41,9 +41,9 @@ librecrypt_settings_prefix(const char *hash, size_t *hashsize_out, void *reserve goto zero; /* $covered$ (TODO we currently don't have an algorithm to trigger this) */ /* Get the hash size */ - if (!librecrypt_check_settings_(&hash[ret], len - ret, "%^b", - &hashsize, (uintmax_t)1u, (uintmax_t)SIZE_MAX, - algo->decoding_lut, algo->pad, algo->strict_pad)) + if (!librecrypt_scan_settings_(&hash[ret], len - ret, "%^b", + &hashsize, (uintmax_t)1u, (uintmax_t)SIZE_MAX, + algo->decoding_lut, algo->pad, algo->strict_pad)) goto zero; *hashsize_out = (size_t)hashsize; -- cgit v1.2.3-70-g09d2