dtr32221 2017-12-20 20:07
浏览 38

在PHP文件中编码密钥和密码

I have a website that uses mysql database, as well as amazon S3. Currently, I have all the passwords and info for the database and for the S3, just written down in php files.

I was thinking, since I am not the only developer working on the project, it would be great to encode sensitive data somehow, so it is hidden in files, and hidden for anyone other accessing the files through ftp or cpanel.

I have no idea where to start looking for the answer to this. Is it even possible? There may be some kind of third party, that can encode everything, but I just don't know yet.

Please if anyone has some ideas, or has any experience with this kinda stuff, share your knowledge with me and anyone having the same issue.

  • 写回答

1条回答 默认 最新

  • dousong3760 2017-12-20 20:34
    关注

    For passwords I recommend these 2 php functions
    password_hash() and password_verify().

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog