From bc09948273c34a4eeceec028036ec69b3fd4b754 Mon Sep 17 00:00:00 2001 From: Iker Pedrosa Date: Fri, 6 Feb 2026 16:31:56 +0100 Subject: [PATCH] lib/chkhash.c: fix yescrypt hash length comment Fix misleading comment that stated "43-char (minimum) hash" when the actual regex pattern requires exactly 43 characters. Update comment to accurately reflect the implementation behavior. Signed-off-by: Iker Pedrosa Reviewed-by: Alejandro Colomar --- lib/chkhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chkhash.c b/lib/chkhash.c index 9123038ad..6ecdbac79 100644 --- a/lib/chkhash.c +++ b/lib/chkhash.c @@ -53,7 +53,7 @@ is_valid_hash(const char *hash) if (strlen(hash) < 13) return false; - // Yescrypt: $y$ + algorithm parameters + $ + salt + $ + 43-char (minimum) hash + // Yescrypt: $y$ + algorithm parameters + $ + salt + $ + 43-char hash if (match_regex("^\\$y\\$[./A-Za-z0-9]+\\$[./A-Za-z0-9]{1,86}\\$[./A-Za-z0-9]{43}$", hash)) return true; -- 2.47.3