From c35b47228f5494f4d806e9166628110af6dd2469 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 20 May 2026 23:04:11 +0200 Subject: Add (so far untested and undocument) support for pepper 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'librecrypt_settings_prefix.c') diff --git a/librecrypt_settings_prefix.c b/librecrypt_settings_prefix.c index c8fed53..89bb5ae 100644 --- a/librecrypt_settings_prefix.c +++ b/librecrypt_settings_prefix.c @@ -4,15 +4,13 @@ size_t -librecrypt_settings_prefix(const char *hash, size_t *hashsize_out, void *reserved) +librecrypt_settings_prefix(const char *hash, size_t *hashsize_out, LIBRECRYPT_CONTEXT *ctx) { size_t i, len, ret = 0u; size_t last_offset = 0u; const struct librecrypt_algorithm *algo; uintmax_t hashsize; - (void) reserved; - /* Find last algorithm, and beginning of result */ for (i = 0u; hash[i]; i++) { if (hash[i] == LIBRECRYPT_HASH_COMPOSITION_DELIMITER) @@ -34,7 +32,7 @@ librecrypt_settings_prefix(const char *hash, size_t *hashsize_out, void *reserve if (ret == i) goto zero; /* Return 0 as hash size if algorithm cannot be identified or has fixed hash size */ - algo = librecrypt_find_first_algorithm_(&hash[last_offset], len - last_offset); + algo = librecrypt_find_first_algorithm_(&hash[last_offset], len - last_offset, ctx); if (!algo) goto zero; if (!algo->flexible_hash_size) -- cgit v1.2.3-70-g09d2