Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
Merge pull request #352 from physicsfamily/patch-1
Browse files Browse the repository at this point in the history
Update MosquittoPBKDF2.java
  • Loading branch information
jpmens committed Nov 16, 2018
2 parents 4e7fe9a + 00e5e5f commit ca9562c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/java/MosquittoPBKDF2.java
Expand Up @@ -57,7 +57,7 @@ public boolean isValidPassword(String plainPassword, String hashedPasword) {
} catch (NoSuchAlgorithmException e) {
System.out.println("Need a Java implementation with cryptography.");
}
KeySpec ks = new PBEKeySpec(plainPassword.toCharArray(), encodedSalt, encodedIterations, 198);
KeySpec ks = new PBEKeySpec(plainPassword.toCharArray(), encodedSalt, encodedIterations, MosquittoPBKDF2.KEY_LENGTH);
SecretKey s = null;
try {
s = f.generateSecret(ks);
Expand Down

0 comments on commit ca9562c

Please sign in to comment.