开发者

How do I encode something in PHP with a key?

I see base64_encode can encode values, but without a key. I need a function that takes a salt and data, encodes it, and can be decoded with the same salt (but if you try to decode it without the salt, it 开发者_StackOverflowgives you gibberish).

Is there a PHP function for this (can't find it, only modified versions of base64_encode).

EDIT: Found the answer: use mcrypt ciphers


What about taking a look at http://www.php.net/manual/en/book.mcrypt.php

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜