5

I found this on github occasionally.

md5(text).equals(text)

Could this happen in common use?

assylias
  • 321,522
  • 82
  • 660
  • 783
Brutal_JL
  • 2,839
  • 2
  • 21
  • 27
  • Considering that's not how you compare Strings in java, it's unlikely to work, period. Aside from that, it's unclear what you're asking. The project you link to is about *trying to find* a string that MD5s to itself. – Brian Roach Jan 03 '14 at 08:18
  • Why you not just following the "Kember Identity" which is also referenced on your linked github resource? http://elliottkember.com/kember_identity.html – Stefan Jan 03 '14 at 08:21
  • @BrianRoach I have edited assuming that the op was not asking that. – assylias Jan 03 '14 at 08:21
  • @assylias I didn't find that question.Thanks for editing my question. :) – Brutal_JL Jan 03 '14 at 08:31
  • @Stefan I'll remeber it next time.thanks – Brutal_JL Jan 03 '14 at 08:33
  • @BrianRoach I thought there are alot of people don't know Java grammer.So I take a simple expression. – Brutal_JL Jan 03 '14 at 08:35

1 Answers1

-1

MD5 is hash algorithm, with collisions. That means that there can be two strings X and Y with same hash.

But this seems incorrect. I'm no expert in hashing, but my gut feeling is, this will be always false.

There is some more info in the linked blog post and corresponding comments - http://elliottkember.com/kember_identity.html

jnovacho
  • 2,825
  • 6
  • 27
  • 44
  • 1
    It depends on the underlying algorithm. They usually use simple operation (bitwise shifts, additions multiplications etc.) over fixed size chunks of the original data. – Mihai Stancu Jan 03 '14 at 08:23