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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:09:14+00:00 2026-05-11T07:09:14+00:00

I need to salt and hash some passwords so that I can store them

  • 0

I need to salt and hash some passwords so that I can store them safely in a database. Do you have any advice or ideas as to how best to do this using Linq To SQL?

  • 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. 2026-05-11T07:09:14+00:00Added an answer on May 11, 2026 at 7:09 am

    LINQ to SQL doesn’t have much relevance in this case. You could use any mechanism you want to, because you won’t be doing hashing and salting in SQL.

    The steps to save a password would go along these lines:

    1. Receive the password as cleartext, along with the user’s ID.
    2. Generate (and remember) the salt.
    3. Combine the salt with the password text, e.g. prepend it or append it.
    4. Hash the resulting text with your hash function
    5. Store the user ID, the hash and the salt in your DB.

    The steps to verify a password would go along these lines:

    1. Receive the password as cleartext, along with the user’s ID.
    2. Retrieve the hashed and the salt from the DB for the supplied user ID.
    3. Combine the salt with the supplied password text.
    4. Hash the resulting text with your hash function.
    5. Compare the hash from the function with the hash retrieved from the DB.
    6. If they are equal, the supplied password was correct.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
I currently have a legacy database (SQL 2005) that generates hash strings for tokens.
Need some regular expressions help. So far I have my code working to allow
Need some help... I have jasperserver 4.1 installed on my ubuntu. It runs via
Need help with a query that I wrote: I have three tables Company id
Probably a super basic question. I know many online services hash and salt passwords
I need to store hashes of passwords on disk. I am not entirely sure
Is the following a good way to salt passwords? hash('sha256', $_POST['password'], $_POST['email']) I am
I'm looking for some examples of how to securely store passwords and other sensitive
I need to generate md5 hash for ~40 millions strings with salt (~20 symbols),

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.