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 7698017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:08:41+00:00 2026-05-31T22:08:41+00:00

I have a bit of a dilemma here. I have a drupal 7 database

  • 0

I have a bit of a dilemma here. I have a drupal 7 database table of users, with corresponding passwords. All these passwords have been naturally encrypted. My assumption is that these are MD5 hashes, but not quite.

The challenge here is that, we are utilizing the same set of users in a companion website that uses similar credentials but a different technology [please don’t blame me for this, I a mere pawn].

Now if I knew how Drupal goes about encrypting its passwords, maybe I could decrypt them and apply the same in my backend logic?

  • 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-31T22:08:42+00:00Added an answer on May 31, 2026 at 10:08 pm

    Note that these passwords are hashed, not encrypted. The fundamental difference between hashing and encryption is that with encryption you would be able to recover the original password. You won’t be able to do that when they are hashed (not without a lot of effort), and that’s by design.

    Think of hash browns: if you’ve made a hash brown, you won’t be able to get the original potatoes back. This is done so that if a hacker compromises your system and gains access to the database, they won’t be able to see or recover the original passwords.

    So how does one check if the user entered the correct password? Well, when the user tries to log in and enters a password, you apply the same functions to the user input and see if the output is the same thing as what’s stored in the database. Since hashing functions are deterministic, you’ll always get the same output with the same input.

    The key to getting multiple applications to work with the same hashes is have them use the same functions on the passwords when attempting to authenticate a user. Drupal probably also uses one or more salts – but that’s not important. As long as the same logic is used by your applications, the hashes will be always fully compatible.

    Suppose Drupal uses something like this as its authentication system (very simplified pseudo-ish code):

    /*
        input: user-entered $username and $password
        output: true if authorized, false otherwise
    */
    function auth($username, $password) 
    {
        $salt = 'some random salt';
    
        // input is sanitized somewhere, somehow
        $hash_from_db = db_result('SELECT hash FROM users WHERE username = "$username"');
        $hashed_input = sha1($password . $salt);
    
        if ($hash_from_db != $hashed_input)
            return false;
        else
            return true; 
    }
    

    If your other application uses the exact same thing to authenticate its users, it will work fine. Note that Drupal’s authentication scheme will probably be a lot more complex, but don’t let that faze you. It’s just about doing the same thing Drupal does.


    For Drupal, here’s where you can start: user_hash_password().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am going through a bit of a design dilemma, I have been targeting
I have a bit of a dilemma here. I have an app that has
Where I work we have a little bit of a dilemma... I work on
I have a bit of a question that has been bothering me for a
Good morning, I have a bit of a dilemma. I have a webservice reference
I'm having a little bit of a dilemma. I have a very basic class
I have a bit of a dilemma where I'm trying to add 'figures' (numbers)
I have a bit of a design dilemma at present. I have an abstract
I have a few columns in my database schema that have bit data types
I have a bit of a dilemma and I was wondering if the good

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.