Are hash values globally unqiue
Posted
by Wololo
on Stack Overflow
See other posts from Stack Overflow
or by Wololo
Published on 2010-03-24T06:23:27Z
Indexed on
2010/03/24
6:33 UTC
Read the original article
Hit count: 340
I want to generate a hash code for a file. Using C# I would do something like this then store the value in a database.
byte[] b = File.ReadAllBytes(@"C:\image.jpg");
string hash = ComputeHash(b);
Now, if i use say a Java program that implements the same hashing alogorithm (Md5), can i expect the hash values to be the equal to the value generated in C#? What if i execute the java program from different environments, Windows, Linux or Mac?
© Stack Overflow or respective owner