PHP将密码存储在Cookie中

编程入门 行业动态 更新时间:2024-10-13 00:33:36
本文介绍了PHP将密码存储在Cookie中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有一种相对安全的方式将密码存储在cookie中的浏览器cookie(用于记住登录信息)中,而无需为数据库中的哈希创建额外的列? 谢谢.

Is there a relatively secure way to store the password in the browser cookie (for remembering the login information) in the cookie without creating an extra column for hash in database? Thanks.

推荐答案

在cookie中存储密码的哈希值

Store a salted hash of the password in the cookie

$salt = 'snfcikkfbnvekrew'; $cookie_value = md5($salt . $password);

更多推荐

PHP将密码存储在Cookie中

本文发布于:2023-05-29 03:38:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/335887.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:词库加载错误:Could not find file 'D:\淘小白 高铁采集器win10\Configuration\Dict_Sto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!