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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:58:22+00:00 2026-05-16T08:58:22+00:00

Any comments/improvements on this process? User Table: id, username, password, salt Storing a New

  • 0

Any comments/improvements on this process?

User Table:
id, username, password, salt

Storing a New User

  1. Receive the username (plaintext) from $_POST
  2. Receive the password (sha512’d using javascript) http://pajhome.org.uk/crypt/md5/sha512.html from $_POST
  3. Generate a 128 character salt (alphanumeric with symbols) on the server and store it in the salt column
  4. Prepend the password hash with the salt and save it in the password column
  • 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-16T08:58:23+00:00Added an answer on May 16, 2026 at 8:58 am

    Yes. A few things:

    • It’s pointless to hash the data client-side with Javascript. Use https to transmit the data instead.
    • The point of salt is to thwart rainbow table attacks, where the attacker has precomputed the hashes of a big number of strings in order to find a reverse correspondence from hash to original string. It’s pointless to prepend the salt to the hashed password, because the attacker can simply strip the salt.

    The correct way is this:

    1. Send the password to the server only encrypted via https (no Javascript)
    2. Generate a long, random salt – use a good random generator (not PHP’s rand…)
    3. Append the password to the salt
    4. Store a hash of the salt+password, together with the salt.

    Then, to authenticate:

    1. Send the password to the server only encrypted via https
    2. Get the salt from the DB
    3. Append the password to the salt
    4. Compute the hash of the salt+password and compare with what you have in the DB
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the paragraph on OpenID security from Wikipedia . Are there any new
I have a blog post page with comments. Any user (logged in or not)
Since I can't make any comments (only post an answer) to this post ,
any comments on my code on allowing user to download file. if(fileObject !=null) response.setHeader(Content-disposition,
This is a bit complicated; I'd welcome any comments on how to improve the
Do anyone have any comments about this issue. This is a MDI Child form
Found two libraries Rebex ( www.rebex.net ) and QuikSoft ( www.quiksoft.com ) any comments
I have a source of python program which doesn't have any documentation or comments.
Is there any (reasonably) straightforward way to generate comments to explain the structure of
Is there any way with TextMate to hide comments when editing code? Sometimes I

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.