安全字符串与哈希

发布于 2024-12-22 02:52:06 字数 296 浏览 3 评论 0原文

阅读此讨论,我想知道 SecureString 与在会话中存储密码时的哈希值。有什么想法吗?

Reading this discussion , I am wondering about the pro/cons of SecureString vs hash when storing password in session. Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柒夜笙歌凉 2024-12-29 02:52:06

您不应在会话中存储密码。
句号。

 

您应该只将密码作为加盐哈希值存储在数据库中(最好使用 bcrypt 或 scrypt)。

You should not store a password in session.
Period.

 

You should only ever store passwords as salted hashes in a database (preferably using bcrypt or scrypt).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文