I can insert a row by using code below.
USE pmdb;
INSERT INTO md5_tbl (md5_val, username, password) VALUES(MD5('abcdef'), 'usna', MD5('Aa123456'));
How can i decrypt or decode password when i select the row by using username field?
Firstly, MD5 is a hashing algorithm = no decryption possible (except brute force attacks, but...)
Secondly, don't use MD5 for hashing passwords, it isn't secure at all. Instead, use at least SHA family + technique called "salting".
MD5 can't be decrypt,
You should search the value of the MD5 of your entered password in your database to compare.
SELECT * FROM md5_tbl WHERE password = MD5('password') AND username = 'username'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With