Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5977349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:21:28+00:00 2026-05-22T21:21:28+00:00

I have a requirement to decrypt the Encrypted (not Hashed) passwords located in my

  • 0

I have a requirement to decrypt the Encrypted (not Hashed) passwords located in my aspnet_Membership table. In that database I see the Password (Encrypted) and PasswordSalt fields, and I can look at my web.config to find the machinekey > decryptionKey (validation=”SHA1″ decryption=”AES”).

note: I would love to use Hashed password, but for business reasons I need to be able to use the password for a Member, for SSO into and from other remote systems, hence using Encrypted (definitely NOT using Clear – yukky!)

Given all that, surely there is a way to retrieve the password as Clear, plain and readable text, i.e. decrypted, but I’m having real trouble finding any website, or answer on stackoverflow (and I’m looking at all the “similar questions” and “question with similar titles” here) that explains how this can be done.

I’ve found the MembershipProvider.DecryptPassword Method page, but I still cannot work out how to actually use this in my code. I’ve also found other pages, via Google, but most example of password decryption don’t appear to take the salt and decrytionKey’s into account.

Does anyone have a straight forward example of selecting the password, passwordsalt and decryptionkey from their respective locations, and using them to decypt an ASP.NET 2.0 Membership Encrypted password?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:21:29+00:00Added an answer on May 22, 2026 at 9:21 pm

    Create a class that inherits from SqlMembershipProvider and in it you can call the decrypt.

    All the code you need for this can be found in this article by Naveen Kohli:

    After looking through the code in reflector, I saw that Microsoft
    providers decrypts in two steps. The encrypted password is actually a
    Base64 conversion of encrypted data. So first it converts it back from
    Base64 and then calls DecryptPassword method. I just did the easiest
    thing. Copied the code from Microsoft implementation, removed all the
    checks it was doing and then used it. Following class is an example of
    a class derived form SqlMembershipProvider with a method that just
    returns me password in clear text for a given encrypted password.

    namespace MembershipPasswordRecover
    {
        public class NetFourMembershipProvider : SqlMembershipProvider
        {
            public string GetClearTextPassword(string encryptedPwd)
            {
                byte[] encodedPassword = Convert.FromBase64String(encryptedPwd);
                byte[] bytes = this.DecryptPassword(encodedPassword);
                if (bytes == null)
                {
                    return null;
                }
                return Encoding.Unicode.GetString(bytes, 0x10, bytes.Length - 0x10);
    
            }
        }
    }
    
    static void Main(string[] args)
    {
        var passwordManager = new NetFourMembershipProvider();
        var clearPWd = passwordManager.GetClearTextPassword("encryptedpasswordhere");
        Console.WriteLine(clearPWd);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement to create an installer that includes third party dll's that
I have requirement to import Excel file in MySQL database using Java. I Googled
I have a ASP.Net C# application that needs to connect to an external API
How to perform 256 Bit AES Encryption (Using Rijndael algorithm). Requirement: I have implemented
I have requirement like this, Have One NSIMageView and which will be changing frequently
I have requirement for my project. I want the my Relative layout to slide
I'm working on a little script in VBA that would allow me to automatically
I have the following code below to generate an OpenSSL RSA public and private
How do I reversibly (symmetrically) encrypt a filename (with or without directory path, I'm
unfortunately, we've been requested to offer our users the ability to get an email

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.