且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在MVC5中解密密码?

更新时间:2023-02-25 08:20:14

首先,MVC根本没有身份验证功能,它只是一个网站的演示框架。如果您有密码等,那么您将使用不同的框架来实现,例如ASP.Net成员资格或身份。



至于问题,它取决于如何存储密码。如果它是散列的(这是默认值),则根本无法对其进行解密。如果您不想回复电子邮件,那么您可以随时使用自己的密码重置功能(用于散列密码),或密码解密页面(如果使用加密密码),谷歌asp.net membership重置密码了解更多详情,这些API都有详细记录。
First off MVC has no authentication feature at all, it's simply a presentation framework for websites. If you have passwords etc then you'll be using a different framework to implement that such as ASP.Net Membership or Identity.

As for the question, it depends on how the password is stored. If it is hashed (which is the default) then you can't decrypt it at all. If you don't want to reply on email then you can always right your own password reset feature (for hashed passwords), or password decrypt page if it is using encrypted password, google "asp.net membership reset password" for more details, these APIs are well documented.