开发者

PHP: Storing the result of mcrypt

I've just setup Mcrypt properly in my framework and thought it would be sweet to be able to store Encrypted sessions, but I've just can't get it to work. It

The output from Mcrypt is looking something like þøÆ{”ò(ü´îÚÜÇW¹ËŸK­¯L‘rø?ª¶!JF£­º+Œ’Ú, so I thought that I would need to convert it to reduce the risk of charset-related issues. I've tried utf_8_encode and base_64_encode - nothing seems to work.

Just 开发者_StackOverflow社区to ensure, I've changed modes of Mcrypt to cfb ,cbc & ofb modes. Again, no difference.

How should I encode the output of mcrypt to make it universally work for sessions, databases and so on?


PHP's function is called base64_encode() not base_64_encode() as you have posted. That method should work, and would be preferred. What about it is failing, if you are indeed using the correct function name?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜