I need to understand the details of how MembershipProvider performs encryption:
- What algorithm does it use?
- Is there any base64 encoding pre-processing or post-processing?
- Anything extra it does in addition to the standard algorithm it uses?
Given a plain text password to encrypt, please walk me through the exact steps that produce the final encrypted password that’s returned.
I think seeing the source code would go a long way in answering my questions, but I haven’t been able to find it online. I have only found this documentation, which does not provide implementation details.
Thanks for any info!
Below is the code that you want / need… it’s a little bit of a rabbit warren getting there, so to fully understand, I would recommend doing the following:
[Optional] Install dotPeek
var dummyMembershipProvider = new SqlMembershipProvider();dummyMembershipProvider.ChangePassword("userName", "oldPassword", "newPassword");ChangePasswordSqlMembershipProvider.ChangePasswordSqlMembershipProvider.EncodePasswordMembershipProvider.EncryptPasswordIMembershipAdapter.EncryptOrDecryptDataMembershipAdapter.EncryptOrDecryptDataMachineKeySection.EncryptOrDecryptDataAnyway, here’s the MachineKeySection.EncryptOrDecryptData: