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