I’m currently using MD5 and SHA1 to save my users’ passwords in a database but I don’t know how to get them back in plain text. I tried to roll back same code I used to encrypt passwords but it gives me an error.
Code I’m using to encrypt passwords:
$hashedpassword = md5(md5(sha1(sha1(md5($normalpassword)))));
I tried to do the same thing back like this
$normalpassword = md5(md5(sha1(sha1(md5($hashedpassword)))));
Then I realized it’s something funny 🙁 !! Please help me…
MD5 and SHA-1 are one-way hash functions, meaning you can’t get back an original string from a hash value.