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

  • Home
  • SEARCH
  • 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 6099907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:19:35+00:00 2026-05-23T13:19:35+00:00

I have a small community website and I need to implement some sort of

  • 0

I have a small community website and I need to implement some sort of forgotten password function. I currently store the passwords in the DB, encrypted with MD5.

Is it possible to sort of ‘decrypt’ and send it to user via email or would I need to have a password reset page?

  • 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-23T13:19:36+00:00Added an answer on May 23, 2026 at 1:19 pm

    An MD5 hashed password is not reversible. (MD5 is hashing, and not really encrypting, so there’s a subtle difference). And yes you’ll definitely want to provide a password “reset” process (and not simply email the password).

    To give you a high level workflow for secure password resets…

    1. When user asks to reset their password, make them enter their email address
    2. Don’t indicate if that email address was valid or not (just tell them that an email was dispatched). This is open for debate as it lowers usability (i.e. I have no idea which email I registered with) but it offers less information to people trying to gather information on which emails are actually registered on your site.
    3. Generate a token (maybe hash a timestamp with a salt) and store it into the database in the user’s record.
    4. Send an email to the user along with a link to your https reset page (token and email address in the url).
    5. Use the token and email address to validate the user.
    6. Let them choose a new password, replacing the old one.
    7. Additionally, it’s a good idea to expire those tokens after a certain time frame, usually 24 hours.
    8. Optionally, record how many “forgot” attempts have happened, and perhaps implement more complex functionality if people are requesting a ton of emails.
    9. Optionally, record (in a separate table) the IP address of the individual requesting the reset. Increment a count from that IP. If it ever reaches more than, say, 10… Ignore their future requests.

    To give you a little more detail into hashing…

    When you hash a value like a password using the md5() function in PHP, the final value is going to be the same for that password no matter which server you run it on. (So there’s one difference we can see right away between hashing and encryption… There’s no private/public key involved).

    So this is where you’ll see people mention a vulnerability to rainbow tables. A very basic explanation of a rainbow table is… You md5() hash a bunch of dictionary words (weak passwords) in order to get their md5() hashed values. Put those in a database table (rainbow table).

    Now, if you compromise a web site’s database, you can run the users’ hashed passwords against your rainbow table to (in essence) “reverse” the hash back to a password. (You’re not really “reversing” the hash… But you get the idea).

    That’s where “salting” your passwords is best practice. This means (again, very basic idea here) that you append a random value to the users’ passwords before you hash it. Now, when the rainbow table is run against your database, it’s not as easily “reversed” because the md5() hash of “password” is different than “password384746”.

    Here’s a nice SO Q/A that should help. Secure hash and salt for PHP passwords

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

Sidebar

Related Questions

I have small class called 'Call' and I need to store these calls into
I have small utility that does some processing on a file and changes the
I have a small JS function that does Ajax for me and another like
We have a small 3 developer team that is currently using Subversion for our
I have created a small Java application to automatically test some expressions for a
I'm building a small local social good community website where every project has his
We have a very small, specialized user base. No community. My boss wants to
I have a small question to ask the community. I am wondering why my
have small problem, and would very much appreciate help :) I should convert byte
I have small page which has label, DropDownList and a submit button. <div> <asp:label

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.