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.

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

报告相同问题?

悬赏问题

  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器