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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:03:24+00:00 2026-05-23T08:03:24+00:00

Sorry, this may be dumb, but there is something I don’t understand about Phpass.

  • 0

Sorry, this may be dumb, but there is something I don’t understand about Phpass. If I can create a secure hashed password like this:

$pwdHasher = new PasswordHash(8, FALSE);
$hash = $pwdHasher->HashPassword( $password );

and later check it like this:

$checked = $pwdHasher->CheckPassword($password, $hash); 

then that means that logically the passwords must be stored in such a way as they can only be read on a specific machine (otherwise someone could just use the “CheckPassword” function on another machine to get the password). How does Phpass do this?

If I need to move a website to a new server in the future, doesn’t this cause a problem? How do I safely backup my database such that in case of a major server failure, I can recover all the passwords? (Am I missing something obvious?)

Edit – in response to the comments below, if different machines do not affect it then if a hacker gets access to my database, why can’t they just execute CheckPassword on their own machine to get the original password? Sorry, I must be missing something obvious.

Edit 2 – Damn, I was missing something obvious. The compare function only checks the given password against the hashed one and returns true or false – you never actually have to have access to the password itself. Apologies for being dumb!

  • 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-23T08:03:25+00:00Added an answer on May 23, 2026 at 8:03 am

    The hashes created by bcrypt use the modular crypt format that does not just contain the hash value but also an indicator of the used hash function, the number of rounds, and the salt that has been used to create the hash value. In your case the returned strings look like this:

    $2a$08$sssssssssssssssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
    

    That means everything you need to verify a password is stored in this string.

    The reason why attackers can’t just use this string and get the original password is because of one significant property of a good cryptographic hash functions: “it is infeasible to generate a message that has a given hash.”

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

Sidebar

Related Questions

I'm sorry this may seem a bit basic, but I can't get my head
Sorry if this question may be simple, but I can't seem to find an
Ok, this may be a dumb question, but I can't find a way to
Sorry, this may or may not be a programming question directly, but I am
Ok sorry this might seem like a dumb question but I cannot figure this
Sorry that this may seem like a rookie question, but it's a real pain
This may be very simple question, sorry about my lack of knwoledge, and my
Sorry if this question may seem easy to some but i cannot seem to
I'm sorry if this is too simple for some people, but I still don't
This may be a dumb question. But I just received permissions to read/write to

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.