哪种算法更适合散列密码 C#?哪种、更适合、算法、密码

2023-09-07 09:32:53 作者:奶罐超甜的.

可能重复:我应该使用什么算法将密码散列到我的数据库?

我对密码哈希不熟悉.我读了哈希+盐使密码非常安全.但是我仍然很困惑我应该使用哪种哈希算法,因为有很多类似的.

微信上线新功能,聊天信息可以加密了

MD5CryptoServiceProviderSHA1ManagedSHA256Managed

我怎样才能决定哪一个对我有好处或所有人都是平等的.我可以盲目接人吗?

解决方案

MD5:p>

在 1996 年,发现 MD5 的设计存在缺陷,而在不是一个明显致命的弱点,密码学家开始推荐使用其他算法,例如 SHA-1,后来发现也很脆弱.

SHA1:

2005 年,密码分析员发现对 SHA-1 的攻击表明算法可能不够安全,无法持续使用

SHA2 SHA256 是一种类型,截至写作时刻.

Possible Duplicate: What algorithm should I use to hash passwords into my database?

I am new to this hashing on password. I read the hashing + salt make passwords really safe. But still confused which hashing algorithm should I use as there are many like.

MD5CryptoServiceProvider SHA1Managed SHA256Managedetc.

How can I decide which one is good for me or all are equal. Can I pick up anyone blindly?

解决方案

MD5:

In 1996, a flaw was found with the design of MD5, and while it was not a clearly fatal weakness, cryptographers began recommending the use of other algorithms, such as SHA-1—which has since been found to be vulnerable as well.

SHA1:

In 2005, cryptanalysts found attacks on SHA-1 suggesting that the algorithm might not be secure enough for ongoing use

SHA2 which SHA256 is a type of does not have a known vulnerability as of the moment of writing.