aboutsummaryrefslogtreecommitdiffstats
path: root/librecrypt_settings_prefix.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-20 20:29:04 +0200
committerMattias Andrée <m@maandree.se>2026-05-20 20:33:29 +0200
commit3454e0328d57f57852bf12d698b6b4a4736d0719 (patch)
treeb05330eabb10715b8fee2bbe022805ef386276b8 /librecrypt_settings_prefix.c
parentAdd librecrypt_is_enabled (diff)
downloadlibrecrypt-3454e0328d57f57852bf12d698b6b4a4736d0719.tar.gz
librecrypt-3454e0328d57f57852bf12d698b6b4a4736d0719.tar.bz2
librecrypt-3454e0328d57f57852bf12d698b6b4a4736d0719.tar.xz
Prepare for supporting custom algorithms
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--librecrypt_settings_prefix.c8
1 files changed, 4 insertions, 4 deletions
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;