You should not use md5 to hash passwords. It is built for speed, which facilitates the attack. Use bcrypt instead . In addition, you should not try to decrypt the password after saving it. See the Examples on the bcrypt page for password verification with user input. Learn more about how to safely store passwords.
jBcrypt is also very easy to use. This is how you enter the password:
BCrypt.hashpw(password_from_user, BCrypt.gensalt());
And check this out:
BCrypt.checkpw(password_from_user, hashed_password_from_database)
dagge source
share