diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-20 23:04:11 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-20 23:04:11 +0200 |
| commit | c35b47228f5494f4d806e9166628110af6dd2469 (patch) | |
| tree | 3b5a123af999a5e047b8565efee293a5d95c3f6c /librecrypt_settings_prefix.c | |
| parent | Prepare for supporting custom algorithms (diff) | |
| download | librecrypt-c35b47228f5494f4d806e9166628110af6dd2469.tar.gz librecrypt-c35b47228f5494f4d806e9166628110af6dd2469.tar.bz2 librecrypt-c35b47228f5494f4d806e9166628110af6dd2469.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'librecrypt_settings_prefix.c')
| -rw-r--r-- | librecrypt_settings_prefix.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) |
