是否有内置函数来在.NET中散列密码?

use*_*257 5 .net security passwords hash

在数据库中看到了这个问题加密/散列明文密码

我知道我不应该做md5("盐"+密码); 我在python中看到了一个解决方案的实现.

是否有一个.NET内置函数与params我可以使用而不是自己编写?

Oma*_*mar 1

查看FormsAuthentication.HashPasswordForStoringInConfigFile

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

string hashSHA1 = FormsAuthentication.HashPasswordForStoringInConfigFile(Pass + Salt, "SHA1");
Run Code Online (Sandbox Code Playgroud)