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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:41:18+00:00 2026-06-10T20:41:18+00:00

Possible Duplicate: What is the best 32bit hash function for short strings (tag names)?

  • 0

Possible Duplicate:
What is the best 32bit hash function for short strings (tag names)?

I need to hash many strings to 32bit (uint).

Can I just use MD5 or SHA1 and take 4 bytes from it? Or are there better alternatives?

There is no need for security or to care if one is cracked and so on.
I just need to hash fast and uniform to 32 bit. MD5 and SHA1 should be uniform.

But are there better (faster) build in alternatives I could use? If not, which of both would you use?

Here someone asked which one is better, but not for alternatives and there was a security matter (I don’t care for security):
How to Use SHA1 or MD5 in C#?(Which One is Better in Performance and Security for Authentication)

  • 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-10T20:41:19+00:00Added an answer on June 10, 2026 at 8:41 pm

    If security does not play a role, generating a hash with a cryptographic hash function (such as MD5 or SHA1) and taking 4 bytes from it works. But they are slower than various non-cryptographic hash functions, as these functions are primarily designed for security, not speed.

    Have a look at non-cryptographic hash functions such as FNV or Murmur.

    • Non-Cryptographic Hash Function Zoo
      • Performance Graphs
    • MurMurHash3, an ultra fast hash algorithm for C# / .NET

    Edit: The floodyberry.com domain is now registered by a domain parking service – removed dead links

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

Sidebar

Related Questions

Possible Duplicate: Best way to find Browser type & version? In HTML/JavaScript, How can
Possible Duplicate: Best XML Parser for PHP Using JAXB with Google Android I need
Possible Duplicate: Best way to stop SQL Injection in PHP I need to secure
Possible Duplicate: Best practices in error reporting (Mathematica) Assume that I have a function
Possible Duplicate: Best way to periodically execute a PHP script? I need to run
Possible Duplicate: Best methods to parse HTML How can I parse HTML code held
Possible Duplicate: Best way to programmatically detect iPad/iPhone hardware How can I differentiate the
Possible Duplicate: Best way to parse RSS/Atom feeds with PHP how I can grab
Possible Duplicate: Best practices for efficiently storing md5 hashes in mysql We use Hex
Possible Duplicate: Best radio-button implementation for IOS I am looking at my storyboard and

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.