dongpang4470 2010-06-02 08:55
浏览 11
已采纳

什么是PHP“加密”功能?

Looking for built in encryption functions, not to hide the string from the clever programmer, but instead just to obfuscate it a bit. Looking for functions such as str_rot13 and base64_encode, but I can't seem to locate any. Surely there are more?

  • 写回答

4条回答 默认 最新

  • douwei1408 2010-06-02 15:38
    关注

    For real encryption, mcrypt is the solution. For obfuscation, a third function is uuencode; here's some code for decoding; encoding involves reversing the order.

    $text = str_rot13($text);
    $text = base64_decode($text);
    $text = convert_uudecode($text);
    

    Note that both base64_encode and convert_uudecode increase the size of the data.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部