I want to hear your opinion on my following thought of encrypting passwords for my usage.
I have a JFrame program which uses a textfield (username) and a passwordfield to "login". I want the password to be encrypted and then tested on the password that is saved in my database (Tables: Username, password <- Password is encrypted)
My idea is to create a MD5 hash value (like here explained) of the password that is saved in the database. When logging in the software the password should be encrypted (via MD5 like here) and tested against the one in the db.
Is there a more efficient way, or does mine even work?
Thanks in advance <3