Re: File Hashing
- From: "Johnny Jörgensen" <jojo@xxxxxxxxx>
- Date: Thu, 29 May 2008 11:12:22 +0200
Hi Peter
First of all - thanks for your reply to my question. Much appreciated.
As for your comments on my posting technique:
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.
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.
3) To everybody who answered that my first two questions were identical:
They're not - it depends on the answer.
Thanks,
Johnny J.
"Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx> skrev i meddelandet
news:op.ubvpi7ty8jd0ej@xxxxxxxxxxxxxxxxxxxxxxx
Please do not cross-post between language groups. It's one thing to
"abuse" the C# newsgroup with non-language .NET questions (we all do it
all the time :) ). But if your .NET question is even nominally on-topic
in the C# newsgroup (by virtue of the language you're using), it's
definitely off-topic in the VB.NET newsgroup, and vice a versa.
Follow-ups to m.p.d.l.csharp.
As for the question, you would do well to search this newsgroup for
keywords like "hash", "identical", "file", etc. You'd be amazed at what's
already been said on the topic (especially on your first two questions).
But, the short version is:
On Wed, 28 May 2008 11:44:27 -0700, Johnny Jörgensen <jojo@xxxxxxxxx>
wrote:
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?
2) Two different files will NEVER have the same hash value?
Your first two questions are the same, and so the answer for both is the
same: no, you cannot be sure of that.
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)?
Granted, I'm not a crypto expert. However, I'd say the answer to this is
also "no". If MD5 provided just as much differentiating power as SHA1,
even though it's 128 bits while SHA1 is 160 bits, then why would anyone
bother with SHA1? No, I think it's safe to say that there are at least
some pairs of files for which the MD5 hash is identical, but the SHA1 hash
is not.
Of course, finding two different files that produce the exact same hash in
either algorithm is either contrived or very difficult. But then, it's
still a possibility (see the answer to questions #1 and #2). :)
Pete
.
- Follow-Ups:
- Re: File Hashing
- From: Arne Vajhøj
- Re: File Hashing
- From: Peter Duniho
- Re: File Hashing
- From: Jon Skeet [C# MVP]
- Re: File Hashing
- From: Barry Kelly
- Re: File Hashing
- Prev by Date: Serialization of derived List<T> properties
- Next by Date: Re: Problems with databinding
- Previous by thread: Re: File Hashing
- Next by thread: Re: File Hashing
- Index(es):
Relevant Pages
|