loading...

re: How to Securely Store a Password in Java VIEW POST

TOP OF THREAD FULL DISCUSSION
re: // Java import java.security.SecureRandom; private static final SecureRandom RAND = new SecureRandom(); System.out.println(RAND) Just in case...
 

You can use BCrypt in Java as well Hashing passwords in Java with BCrypt.

public String hash(String password) {
    return BCrypt.hashpw(password, BCrypt.gensalt(logRounds));
}

public boolean verifyHash(String password, String hash) {
    return BCrypt.checkpw(password, hash);
}
Code of Conduct Report abuse