nas*_*ski 5 c# asp.net asp.net-membership sqlmembershipprovider
我正在使用SqlMembershipProvider并将我的密码存储为哈希.我还在另一个表中保存(哈希)密码的历史记录.我希望能够将用户尝试更改密码的密码与旧密码进行比较,如果太近,则会抛出错误.我似乎无法弄清楚如何使用散列函数来执行此操作.基本上我要找的是这样的方法:
public bool PasswordCompare(string plaintextPassword, string salt, string hashedPassword)
{
//where the salt and hashedPassword are pulled out of the aspnet_Membership table
//which are automatically generated by the provider
}
Run Code Online (Sandbox Code Playgroud)
我希望这很清楚,谢谢.
这篇文章有一些很好的信息。看起来你必须:
...实现您自己定制的MembershipProvider,记录密码历史记录并自行加密密码。
| 归档时间: |
|
| 查看次数: |
1561 次 |
| 最近记录: |