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_verify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'librecrypt_verify.c') diff --git a/librecrypt_verify.c b/librecrypt_verify.c index 990f37e..04efff4 100644 --- a/librecrypt_verify.c +++ b/librecrypt_verify.c @@ -4,7 +4,7 @@ int -librecrypt_verify(const char *phrase, size_t len, const char *settings, void *reserved) +librecrypt_verify(const char *phrase, size_t len, const char *settings, LIBRECRYPT_CONTEXT *ctx) { char *hash = NULL; size_t size = 0u; @@ -13,7 +13,7 @@ librecrypt_verify(const char *phrase, size_t len, const char *settings, void *re int ret, err; /* Measure base64 hash size */ - n = librecrypt_hash_(NULL, 0u, phrase, len, settings, reserved, ASCII_HASH); + n = librecrypt_hash_(NULL, 0u, phrase, len, settings, ctx, ASCII_HASH); if (n < 0) { if (errno == EOVERFLOW) errno = ENOMEM; /* $covered$ (on 32-bit) */ @@ -21,7 +21,7 @@ librecrypt_verify(const char *phrase, size_t len, const char *settings, void *re } /* Get position of hash in `settings` */ - off = librecrypt_settings_prefix(settings, NULL, reserved); + off = librecrypt_settings_prefix(settings, NULL, ctx); if (settings[off] == '*') { if ('0' <= settings[off + 1u] && settings[off + 1u] <= '9') { errno = EINVAL; @@ -39,7 +39,7 @@ librecrypt_verify(const char *phrase, size_t len, const char *settings, void *re return -1; /* Calculate password hash and encode to base64 */ - n = librecrypt_hash_(hash, size, phrase, len, settings, reserved, ASCII_HASH); + n = librecrypt_hash_(hash, size, phrase, len, settings, ctx, ASCII_HASH); if (n < 0) { err = errno; librecrypt_wipe(hash, size); -- cgit v1.2.3-70-g09d2