douba9020 2013-04-04 06:07
浏览 39
已采纳

使用php crypt或Mysql加密函数进行字段加密? [关闭]

CodeIgniter application that needs to be able to encrypt/decrypt spefici fields and for specific records.

I am thinking of two posible ways to do this:

  1. Use the crypt() php function and pass the result to the SQL statement
  2. Use the MySql encryption functions

Which one should i choose and why?

  • 写回答

1条回答 默认 最新

  • duanhe0817825 2013-04-04 06:14
    关注

    Use the option that allows the best forward-compatibility.

    If in the future you no longer use a MySQL Database your cryptography will become inoperable.

    Almost all major program languages support some form of mcrypt that you will be able to port should you need to move the code away from php to something else.

    Again, think forward compatibility as you develop your code.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置