Home  >  Article  >  Backend Development  >  cookie session有关问题

cookie session有关问题

WBOY
WBOYOriginal
2016-06-13 12:01:171019browse

cookie session问题
本人正在做一个网站的登陆页。
想把帐号用 cookie保存在用户端。在需要的时候session调用。
现在帐号就是用户的手机号。
我觉得用户手机号保存在客户端不安全。
请问怎么解决。
我感觉用双向加密是不安全的。

------解决方案--------------------
客户端不安全那就保存服务端好了
------解决方案--------------------

<br />$phone = md5("手机号");<br />//这样也不太安全<br />$phone = md5(md5('手机号'));<br />//放心让他们去破解吧<br />

PS:在数据库表里面多添加一个段
注册时候把2次md5的结果也添加到段地址里
用户登录的时候直接查询2次MD5的结果~~~
MD5不可逆,我想到的解决方法就是这样

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn