How to decode md5 password in php

Hello Friends,

There is a problem in php.

Please solve my question.

The Question is How to decode md5 password in php?

Please Tell me the correct solution as soon as possible.

Thank you…

Kewal knojiya

Simple answer is… you dont.

Hashes are meant to be one way.

There are rainbow tables out there that may be able to reverse a MD5 unsalted hash into one of the possible values that match the hash just on brute force. But other than that, nope.

How can i store password in encode format in mysql.

I mean to say that how can encode and password and store it in our database.

as you say md5 is not decode so which php function is use to encode password.

You shouldn’t. You should always using a hashing algorithm (and not MD5, use something stronger – hint: search this forum, there are several discussions about them).

Thanks Mr cpradio
Thank you so much.

You encode the password using a hash (hopefully one better than MD5) and store it in the database.

When the person enters their password again you hash what they enter and compare that to what was saved.

If they forget their password you make them set a new one.