在C#中用MD5CryptoServiceProvider存储密码是否安全? [英] Is it safe to store passwords hashed with MD5CryptoServiceProvider in C#?

查看:165
本文介绍了在C#中用MD5CryptoServiceProvider存储密码是否安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将散列的密码存储在数据库表中。

We are storing hashed passwords in a database table.

我们使用MD5CryptoServiceProvider为每个密码预置一个随机盐值和散列。

We prepend each password with a random salt value and hash using MD5CryptoServiceProvider.

这是安全吗?我已经听说MD5是破碎的。

Is this safe? I have heard MD5 was "broken".

如果没有,你能推荐一个替代的哈希方法使用(特定的.NET框架类)?

If not, can you recommend an alternate hash method to use (specific .NET framework class)?

推荐答案

我认为SHA256,SHA512现在更安全:)

I think SHA256, SHA512 are more safe at this moment :)

href =http://en.wikipedia.org/wiki/Cryptographic_hash_function =nofollow noreferrer> wiki

See wiki

这篇关于在C#中用MD5CryptoServiceProvider存储密码是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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