是否有一个内置的功能,散列.NET密码? [英] Is there a built in function to hash passwords in .NET?

查看:163
本文介绍了是否有一个内置的功能,散列.NET密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了这个问题的http://stackoverflow.com/questions/287517/encrypting-hashing-plain-text-passwords-in-database

,我知道我不应该做的MD5(盐​​+密码);我看到了一个Python实现的解决方案。

and i am aware i shouldnt do md5("salt" + password); and i see an implementation in python for a solution.

有内置的功能与PARAMS一个.NET我可以使用,而不是写我自己?

Is there a .NET built in function with params i can use instead of writing my own?

推荐答案

查看<一个href="http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.hashpasswordforstoringinconfigfile.aspx"相对=nofollow> FormsAuthentication.HashPasswordForStoringInConfigFile

string hashMD5 = FormsAuthentication.HashPasswordForStoringInConfigFile(Pass + Salt, "MD5");

string hashSHA1 = FormsAuthentication.HashPasswordForStoringInConfigFile(Pass + Salt, "SHA1");

这篇关于是否有一个内置的功能,散列.NET密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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