Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakharchenko authored and Vasiliy committed Feb 1, 2020
1 parent 07ebfce commit b478eab
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ private static byte[] getPasswd(byte[] input, int inlen) {
for (int i = 3 + inlen; i < passwd.length - 3 - inlen; i++) {
passwd[i] = 0;
}
SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
passwd[0] = (byte) (0x80 | (((saltOffset++) & 0x0f) << 3) | (
SecureRandom.getInstanceStrong().generateSeed(1)[0] & 0x07));
passwd[1] = SecureRandom.getInstanceStrong().generateSeed(1)[0];
secureRandom.generateSeed(1)[0] & 0x07));
passwd[1] = secureRandom.generateSeed(1)[0];
passwd[2] = (byte) inlen; /* length of the password string */
return passwd;
} catch (NoSuchAlgorithmException e) {
Expand Down

0 comments on commit b478eab

Please sign in to comment.