Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Heya smart friends,

I noticed that .NET hash function can produce different values on different machines.
I need a hash function (for strings) that will produce the same value, no matter what platform it is on, whether it's win xp, vista, 7, 8, server 2k3, 2k8 etc
AND no matter if it's 32 bit or 64 bit (which to my understanding makes a big difference in the hash implementation).

Anyone?
Posted

 
Share this answer
 
Comments
Joezer BH 8-Jan-13 2:05am    
Hi Tadit, the link leads a similar question, HOWEVER, it is unanswered there (or to be exact, there is an incorrect answer there).
Oh I just saw that you have asked that question as well... :P
Have you tried the solution in that link provided by @Kenneth Haugland?
Joezer BH 8-Jan-13 2:25am    
Kenneth suggested the .NET solution, which, even though a great hashing, but as I mentioned there, does not produce the same values on different platform.

So, if you need to produce the hash on two different machines, that won't work...

Do you have an idea?
Joezer BH 8-Jan-13 2:36am    
Actually Kenneth suggested to use RSA which is not even hashing, it's an enctypt\decrypt .NET implemented algorithm.
Late but still...

What I've used eventually is the built in hashing mechanism of MS SQL Server,
I've had it storing the data anyway, so I figures out, hey, it is central, cross platform, actually its cross whatever you want since I only use one SQL Server in that project.

Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900