File Hashing

  • Thread starter Thread starter Johnny Jörgensen
  • Start date Start date
I guess I don't see your point; I don't know exactly what the OP is doing,
but I was simply suggesting a shortcut he could take to identify hash
collissions using a piece of info he may very well have on hand, before doing
a possibly more expensive byte-for-byte comparison.
 
Johnny said:
I'm wondering (and hoping that somebody will be able to answer this):

If I calculate the hash value of files (either MD5 or SHA1), can I then be
sure that:

1) Two files with the same hash value are in fact identical?

Yes (sort of). If you hash two non-identical files and the same hash is
produced, this is more likely to be due to memory corruption than a
break in either MD5 or SHA1.
2) Two different files will NEVER have the same hash value?

No (sort of). By the pigeonhole principle.
3) If two files have the same MD5 hash value, they will ALSO have the same
SHA1 hash value (I should think that will always be the case)?

Yes and No. As above.

Alun Harford
 
Johnny said:
1) The question is NOT crossposted. It would have been if I posted TWO
seperate messages to which people responded indicidually. But I have posted
ONE message to two different groups and replies from one group will show up
in the other.

It has already been explained a couple of time, but:

two identical messages posted to two groups is called multi posting

the same message posted to two groups is called cross posting

You did not multi post, but you did cross post.

Those terms are very well defined.
2) Are you a programmer at all? How can you reason that a post that's
relevant in a C# group cannot possibly be relevant in a VB.NET group? The
only difference (ok maybe not the only, but the most important difference)
is different syntax. If somebody has a general question about the
functionality of a .NET class then syntax doesn't matter, and a VB.NET
programmer can just as well tell you the correct answer as a C# programmer.

There is a separate group for language independent framework questions.

But I don't have a problem with a question being posted to both C# and
VB.NET groups.
3) To everybody who answered that my first two questions were identical:
They're not - it depends on the answer.

I can not see any way they can be anything but true+true and
false+false.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top