哪种算法更适合散列密码 C#? [英] which algorithm preferred for hashing passwords C#?

查看:25
本文介绍了哪种算法更适合散列密码 C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<块引用>

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

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

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.

这篇关于哪种算法更适合散列密码 C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆