安全字符串与哈希
阅读此讨论,我想知道 SecureString 与在会话中存储密码时的哈希值。有什么想法吗?
Reading this discussion , I am wondering about the pro/cons of SecureString vs hash when storing password in session. Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不应在会话中存储密码。
句号。您应该只将密码作为加盐哈希值存储在数据库中(最好使用 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).