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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:54:30+00:00 2026-06-10T00:54:30+00:00

Given a raw password create an unique salt append it to the raw password

  • 0

Given a raw password

  1. create an unique salt
  2. append it to the raw password
  3. brcypt / SHA512 this combination using disposable secret key that changes over time
  4. stores the encrypted password and salt in the user table

To verify identity

  1. append the salt to the raw password
  2. bcrypt / SHA512 the combination verify
  3. checks the hashed against the db hashed value

In the verify part, what if the current secret key is no longer the same?
Should I always keep a list of old key and iterate them through to verify that that old password is generated with one of the old keys? If verifier returns true, I will update the new encrypted password.

Also, how can I be sure the salt is unique per-password-per-user?

Is this all I need to do?

Any thing missing? Thanks.

  • 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-06-10T00:54:32+00:00Added an answer on June 10, 2026 at 12:54 am

    Making sure the salt is unique is easy – you could just hash together the username and the time when the password was last changed.

    As for encryption, that’s only necessary if for some reason you want to store the user’s password, not only be able to verify it. It’s more common and more secure to only store a hash of the password and salt. No secret key is necessary and even if an attacker compromises the database, they will have troubling recovering passwords. The only downside is that you can’t tell users their passwords, you can only reset them.

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

Sidebar

Related Questions

Given a string named line whose raw version has this value: \rRAWSTRING how can
I want to refine the raw text by using regular expression, given a list
How can I access raw body of request object given to me by expressjs?
Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent;
I'm looking to make an HTTP post request given the raw data that I
Given the following Ruby program: def getch begin system(stty raw -echo) ch = STDIN.getc
While parsing an XML, given a Node object, can I retrieve the raw XML
Given these two models: class Profile(models.Model): user = models.ForeignKey(User, unique=True, verbose_name=_('user')) about = models.TextField(_('about'),
Given this simple class: class HasBytes { public byte[] Bytes { get; set; }
I was using httpi-ntlm ruby gem to get the RSS feeds from the given

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.