I am creating a program in which the user will enter the login and the password before entering the system, and after he has entered his input, the passwords will be saved in the database, and then I will check if the encrypted passwords hit the user inputs.
Example:
User entered:
username : 123456
password : 123456
And after that, hash encryption will turn them into:
username : E10ADC3949BA59ABBE56E057F20F883E
password : E10ADC3949BA59ABBE56E057F20F883E
After this will be saved in the database, but there I want to check when the user re-enters the same password, verify that it is equal and hits the generated hash.
I'm doing this program that generates the hash in Java and will be used in html, and then saved to the database.
How can I do this?