From 97b9271b8cd591b88d787dd7c8633086a6fcfe38 Mon Sep 17 00:00:00 2001 From: Connor Date: Sun, 7 Feb 2016 21:27:29 +0000 Subject: [PATCH] Fixed invalid salt version exception on checkpw Yeah, hashes have y in them, not sure if they had an a in the past but now it's different, I guess, works all the same only this time my application doesn't crash. --- src/main/java/org/mindrot/BCrypt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/mindrot/BCrypt.java b/src/main/java/org/mindrot/BCrypt.java index 188193f..f3f23dd 100644 --- a/src/main/java/org/mindrot/BCrypt.java +++ b/src/main/java/org/mindrot/BCrypt.java @@ -662,7 +662,7 @@ public static String hashpw(String password, String salt) { off = 3; else { minor = salt.charAt(2); - if (minor != 'a' || salt.charAt(3) != '$') + if (minor != 'y' || salt.charAt(3) != '$') throw new IllegalArgumentException ("Invalid salt revision"); off = 4; }