对每个数据输入进行哈希处理,而不仅仅是对密码进行哈希处理

发布于 2025-01-13 09:47:29 字数 165 浏览 2 评论 0原文

我对哈希的使用有疑问:

为什么我不应该对插入数据库中的所有数据进行哈希处理,而只对密码进行哈希处理?

对所有值(电子邮件等)进行哈希处理不是更安全吗?这样攻击者就无法获取任何内容,而不是除了密码之外的所有内容?

为什么通常只对密码进行哈希处理?

感谢您的帮助!

i have a question about the use of hashing:

Why shouldn't I have all the Data I insert in the Database hashed instead of only hashing the password?

Wouldn't it be more secure to hash all values(emails etc.), so an attacker can't get anything, instead of everything except the password?

Why is it common to only hash the password?

Thanks for your help!

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

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

发布评论

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

评论(1

冰雪之触 2025-01-20 09:47:29

因为散列是单向事务,所以你不能“取消散列”数据。如果您无法读取该数据并且用户需要在每次需要以任何方式处理数据时再次插入该数据,那么该数据的用途是什么?

Well because hashing is one-way transaction, so you can't "unhash" the data. What purpose would that data then serve, if you can't read it and user needs to insert it every time again every time you need to process the data in any way?

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