I have a codeigniter application that allows users to register and log in to (their passwords are hashed). Now creating a messaging system is all fine but I need a way to keep the messages encrypted in the database. I was planning on using a public key system where every user will have a public/private key pair however I am not sure it's possible to safely store the private keys on the web server. Is there any way to do this?

我有一个codeigniter应用程序,允许用户注册和登录(他们的密码被哈希)。现在创建一个消息传递系统都很好,但我需要一种方法来保持消息在数据库中加密。我打算使用公钥系统,每个用户都有一个公钥/私钥对,但我不确定是否可以安全地将私钥存储在Web服务器上。有没有办法做到这一点?

Also I don't really want the user to have to enter a key or their own password every time they send a message.

此外,我并不希望用户每次发送消息时都必须输入密钥或自己的密码。

Any guidance would be appreciated

任何指导将不胜感激

2 个解决方案

#1


2

First ask yourself "Do I really need this information encrypted?" I would guess that, unless you're working for a bank, you probably don't. But if you reeeeaallly must, use CI's Encryption class:

首先问自己“我真的需要加密这些信息吗?”我猜想,除非你在银行工作,否则你可能不会。但是如果你必须使用CI的加密类:

http://codeigniter.com/user_guide/libraries/encryption.html

http://codeigniter.com/user_guide/libraries/encryption.html

更多相关文章

  1. PHP万能密码登陆
  2. 从mysql中选择加密密码
  3. 具有线程/回复的私人消息系统
  4. Zend数据库适配器-未捕获异常-堆栈跟踪显示用户名和密码
  5. Windows下 MySQL更新密码
  6. Oracle相当于MySQL代码“插入虚拟”以返回错误消息
  7. linux下mysql的root密码忘记,怎么改root密码
  8. Linux下修改MySQL初始密码、开启远程登录、授权远程登录用户
  9. mysql获取某个范围内的随机数,写了个存储过程自动生成随机6为密码

随机推荐

  1. 如何从json对象获取匹配元素的索引?
  2. JavaScript循环输入创建一个对象数组
  3. 彻底解决IE8和IE9下ewebeditor上按钮无效
  4. 如何在JavaScript中对字符串排序
  5. 有没有办法检查两个数组是否具有相同的元
  6. 如何执行浏览器内对比扩展/规范化?
  7. JS数据类型(一)
  8. javascript高阶函数map和reduce
  9. 粗见之正则表达式
  10. 如何在Javascript中从Json数组创建路径路