|
the md5 hash is a one way encryption. it cannot be undone. the only way to "undo" it is to just bruteforce test every combination of characters until you get a matching hash. this is because you will always get the same hash when you md5 something. this is useful for password storage because u can check if the stored md5 hash is the same as the inputted md5 hash to see if it authenticates or not.
base64_encode is much less secure because all that's required is base64_decode. if you want to be able to decrypt information but still maintain security integrity, i suggest looking into the php mcrypt function. it's an extension, but your host should install it for you (if its not already installed, i know for a fact that hostmonster has it isntalled already - just do a function_exists('mcrypt') to check if its installed or not). it supports a wide range of encryption, such as blowfish, aes, etc., and you can supply your own key. since it uses a key to generate the encrypted version, it is more difficult to break because each distinct key generates a different encrypted and decrytped value and the only way the encrypted text could be decrypted would be with the correct key.
|