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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:56:47+00:00 2026-05-23T22:56:47+00:00

I am considering changing the method whereby we encrypt passwords to use a one-way

  • 0

I am considering changing the method whereby we encrypt passwords to use a one-way hash rather than an encryption. I considered using a simple “GetHashCode” on the password string but MS warns that this function may change in the future and is different on 32 and 64-bit OSs. I don’t want the result to ever be different as this would result in all the passwords in the database no longer matching when I have the entered value (e.g. when we all move to .NET 9.0 or something).

So, does a SHA1 Hash eliminate this problem? For example, if I use this C# code:

        var data = System.Text.Encoding.ASCII.GetBytes(value);
        data = System.Security.Cryptography.SHA1.Create().ComputeHash(data);
        return Convert.ToBase64String(data);

will the value always and forever be the same result? I am not too worried about a collision in a space this big but is there any other reason to consider a wider hash? Thanks in advance!

  • 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-23T22:56:48+00:00Added an answer on May 23, 2026 at 10:56 pm

    Yes.

    Unlike GetHashCode, SHA-1 is a fixed algorithm, just like MD5 and SHA-256,
    all of which have been “standardized”.

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

Sidebar

Related Questions

One of my projects use the MyISAM engine in MySQL, but I'm considering changing
My company is considering changing continuous integration servers (I won't say which one we
I am considering using Clojure records to map to changing entities in my program.
Considering the criteria listed below, which of Python, Groovy or Ruby would you use?
Considering a large system with hundreds of assemblies, what is the easiest way to
I am using this method in AndEngine to determine the scene being touched by
Recently one of our clients is considering the posibility of picking up an old
There are lots of questions about recovering passwords on SO, but not about changing
Have you ever attempted using Swing only to end up changing courses because it
We're considering using UUID values as primary keys for our MySQL database. The data

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.