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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:45:18+00:00 2026-05-27T04:45:18+00:00

Until now, and I haven’t used it much, I’ve been using the hasher found

  • 0

Until now, and I haven’t used it much, I’ve been using the hasher found over at phpass. Then I read another post, “forget password page, creating a generated password to email to the user.“, here at stackoverflow written by nageeb.

Excerpt from his post:

Here’s a step-by-step method that I use:

User creates password (via a registration form)
A function creates a random salt and then encrypts the password, in this case, using SHA256 algorithm and using a randomly created salt.

$password_salt = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));

$password_hash = hash(‘sha256’, $salt . $password);

Save the $password_hash and the $password_salt to the users table. These will be used later to authenticate the user when they attempt to login in the future.

When the user logs in, check the username/email/login and if found, grab the hash and salt from the users table and compare the password hash from the db to the hash returned from performing the same function on what they entered as their password.

$salt = $user_record[‘password_salt’];

$entered_hash = hash(‘sha256’, $salt . $entered_password);

Here it looks like php have native functions for all hashing needs. This make me think it must be the better one. Should I stop using phpass and start using the php hash framework?

  • 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-27T04:45:19+00:00Added an answer on May 27, 2026 at 4:45 am

    In short: no, don’t stop using phpass if you’re already using it.

    If there is no other reason for not using it as “it’s not built into PHP” then you should stick with phpass, because it does a little bit more than just “hash” the password:

    • It tries to use blowfish for hashing because it’s more expensive to compute than sha* and therefore harder to crack with brute force
    • If it has to fall back to md5() it calls it many times to “emulate” expensiveness.

    You could do that with PHP’s hashing mechanism but that would be like reinventing the wheel.

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

Sidebar

Related Questions

I'm a ClearCase newbie and up until now have been used to SVN. Therefore,
Up until now I have been using std::string in my C++ applications for embedded
From the .net 4.0 previews I have read until now there has been lots
I have a list of elements, and I've been using will_paginate up until now,
Up until now I've been deploying Rails apps to our Apache/Passenger setup using a
Until now I have only used git packages with gem: gem install <package> Haven't
I came across this recently, up until now I have been happily overriding the
I have a js function which has, until now, always been the callback for
I'm a naughty programmer, and until now I haven't handled errors properly (e.g. just
I have been testing my geolocation query for some time now and I haven't

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.