Since this question is rather popular, I thought it useful to give it an update.
Let me emphasise the correct answer as given by AviD to
In addition, I have tried the mcrypt_encrypt
and one thing please keep in mind. If you do base64_encode(mcrypt_encrypt(...))
.
and then later, you do base64_decode
and output the encrypted data (echo
). You probably will be screwed and not seeing anything. However, if you do mcrypt_decrypt( ... base64_decode($value) )
. You will see the original data.