Click here to Skip to main content
13,139,254 members (89,943 online)
Rate this:
Please Sign up or sign in to 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).

Posted 7-Jan-13 19:34pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Edo Tzumer 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).
Tadit Dash 8-Jan-13 2:14am
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?
Edo Tzumer 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?
Edo Tzumer 8-Jan-13 2:36am
Actually Kenneth suggested to use RSA which is not even hashing, it's an enctypt\decrypt .NET implemented algorithm.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 22 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100