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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:57:35+00:00 2026-06-18T09:57:35+00:00

I want to create a unique hash for a given string and I was

  • 0

I want to create a unique hash for a given string and I was wondering if there is a difference in duplicate hashes for md5 and sha1.

Lets for the sake of argument assume the following code:

foo = "gdfgkldng"
bar = "fdsfdsf"
md5(foo)
>>>> "25f709d867523ff6958784d399f138d9"
md5(bar)
>>>> "25f709d867523ff6958784d399f138d9"

Is there a difference in the probability of this occurring between sha1 and md5? Also: if I use strings that have a big overlap (“blabla1”, “blabla2”) is there a difference?

BTW. I am not interested in the security of the algorithms I just want to create a hash that is as unique as possible.

  • 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-18T09:57:36+00:00Added an answer on June 18, 2026 at 9:57 am

    MD5 has a digest size of 128 bits. SHA-1 has a digest size of 160 bits. Even ignoring discovered weaknesses, MD5 is going to produce more collisions just because it has a smaller output space.

    Consider using SHA-256 instead; it has a digest size of 256 bits (obviously), and furthermore hasn’t been broken in a meaningful way.

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

Sidebar

Related Questions

I want to create a less than or equal to 10 character unique string
I want to hash/encode a unique integer (database ID) to create a similarly unique
I was wondering if there is a way through which one can create unique
I'm using JPA 2.0 and want to create a unique constraint using XML, not
I want to generate android device unique id for my android application to create
I want to create unique directory for controlling directory's disk quota. The unique directory
I have this string here: CREATE UNIQUE INDEX index555 ON SOME_TABLE ( SOME_PK ASC
We want to create a unique machine id - key fingerprint, in order to
I have a MySQL MyISAM table with ISBNs. I want to create a UNIQUE
I want to create hashtable which would take each String from my array 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.