The thing is, you should never 'decode' the password in te first place.
If you can decode it, so can a hacker. If you are not on your own dedicated server, then never use decodable passwords.
MD5 is irreversable, which makes it ideal for passwords. Just store the MD5 hash of the password in the database, and every time you need to check the password, compare the MD5 hash of the submitted password with the hash stored in the database.
If your user loses his password, give him a new password, never decode the old one.