DEV Community


How to decrypt hash password

saboorhamedi profile image saboor ・1 min read

Hello everyone! this is my first time I'm posting here. I have a question, Is it possible to decrypt hash password and fetch them all in table ?
here is the example

Discussion (7)

Editor guide
billernet profile image

If the passwords have been hashed properly then no it's not possible. However if they've been hashed without a salt you might be able to use rainbow tables to find words with hashes that match the ones you have in your database. To be clear though, if your passwords are retrievable from the hash then something is wrong with the way your passwords are being stored!

ganeshh___ profile image
ganesh • Edited

check the type of the hash algorithm md5, sha etc... if the algorithm is old there may exist some techniques to crack it(birthday attack or something) or the hash is already cracked and listed in some password lists. If you have a list of possible passwords, you can hash each one of them and verify against the one you have using a tool like hashcat.

kretaceous profile image
Abhijit Hota

Nope. Hashing is a one-way technique that converts your serialized data to a hashed string.

Different hashing algorithms give you different hashes. But the outputs are always same for a given input for a particular algorithm.

You can use this fact to compare your data by hashing it and comparing it against the already hashed string (in your database maybe).

But no, they can't be reverted back to their original form.

saboorhamedi profile image
saboor Author

Okay thank you everyone for the reply, actually I knew this which is impossible to decrypt a hash password, but as a programmer I thought let's ask people they might know a way to decrypt the hash. But It seems there is no way to do it.

jesse1981 profile image
Jesse Bryant

No, not possible, and that is the point 😉

ryansamaeian profile image

For php, Use password_verify :)(If you used the password_hash method)

p2solution profile image