Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How Does DNN Hash/Encrypt Passwords?How Does DNN Hash/Encrypt Passwords?
Previous
 
Next
New Post
9/14/2012 6:56 PM
 
please note, the NetFourMembershipProvider class is just created as an example in that article (i.e. it's not a class you learn) - what they've done is inherit from SqlMembershipProvider so they can use the methods from that (the this.Decrptpassword call is calling the SqlMembership provider superclass which knows to read the decryption key from the web.config and any other actions required)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/14/2012 8:06 PM
 
cathal connolly wrote:
please note, the NetFourMembershipProvider class is just created as an example in that article (i.e. it's not a class you learn) - what they've done is inherit from SqlMembershipProvider so they can use the methods from that (the this.Decrptpassword call is calling the SqlMembership provider superclass which knows to read the decryption key from the web.config and any other actions required)

 I see the implementation in the article now -- don't know how I missed that.

So, I download the source code for the ASP.NET 2.0 Providers here: http://download.microsoft.com/download/a/b/3/ab3c284b-dc9a-473d-b7e3-33bacfcc8e98/ProviderToolkitSamples.msi

I've made a paste of SqlMembershipProvider.cs for your convenience here: http://pastebin.com/fbWhPsR5

A few things have me confused.  This class inherits directly from MembershipProvider, and in that class DecryptPassword is a virtual method: http://msdn.microsoft.com/en-us/libra...

However, SqlMembershipProvider does not provide an implementation of DecryptPassword, even though it does refer to it one time on line 1923:

byte[] bRet = DecryptPassword( bIn );

So that is mysterious.  Similarly, I cannot find any implementation of EncryptPassword.  

So these methods are vitual in the superclass, and not defined in this class -- how is the class working?

Thanks,
Jonah




 
New Post
9/14/2012 8:49 PM
 
I see I was mistaken in thinking that virtual meant pure virtual. So obviously MembershipProvider provides implmenation of these methods.

Now I just need to find the source code of that class....
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How Does DNN Hash/Encrypt Passwords?How Does DNN Hash/Encrypt Passwords?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out