简体   繁体   中英

How to user ``MembershipProvider``? - Encrypt Password

I have an external application where the Administrator can set the details of the users, so I'm looking for a way to set the password of the users.

What I need for this is the same encryption is using .NET(In the main app I have implemented all these using WebSecurity ).

Also I saw I can duplicate the same encryption using Membership Provider but I can't figure out how to implement it, because MembershipProvider.EncryptPassword is a protected method.

Any idea how can I get the same encryption??

Note: Example input output
Password : testtest

Encrypted password : AMIbPCqv2CKPG7xl7wAbxVvWmML1r0J1aMqTXzq5KwN56pTPp5DNdVQVUNvICRVmSQ==

a way to set the password of the users

Not advisable to do so from security perspective. You should rather have a default password set on user creation and on first login force user to set a new password. This way you do not need to create a password really.

I might be overlooking your requirement but it seems you are going too far with this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM