You don't
Example :
Somone Registers at a site and the password gets converted to md5 then stored into the database
That same person logs in then the site converts the inputted password to md5 and compates it to the
md5 in the database.
If you want to send the password back when registering you will have to store a clean version of it
in a variable and use that.
If somone wants to reset the password generate a new random one store it as md5 in the database
and send the clean one to the mail.