Skip to content

Commit d2552ef

Browse files
antja0ChrisMcKee
authored andcommitted
More descriptive error message when salt is empty
1 parent 1384436 commit d2552ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/BCrypt.Net/BCrypt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ public static string HashPassword(string inputKey, string salt, bool enhancedEnt
606606

607607
if (string.IsNullOrEmpty(salt))
608608
{
609-
throw new ArgumentException("Invalid salt", nameof(salt));
609+
throw new ArgumentException("Invalid salt: salt cannot be null or empty", nameof(salt));
610610
}
611611

612612
if (enhancedEntropy && hashType == HashType.None)

0 commit comments

Comments
 (0)