View previous topic :: View next topic |
Author |
Message |
Blaine Fields Guest
|
Posted: Wed Feb 08, 2006 3:09 am Post subject: NF and CF CheckSum differences |
|
|
I want to take some buyer text data, obtain and checksum for that data and store the checksum in the license key and in the registry. During licensing, the buyer enters the data and the license. During authentication, the program get the check sum of the buyer data and then match it with the imbedded value in the license. This way, the program has a way to match buyer with his license.
Problem: using the CheckSum routine for the desktop application (i.e., .NET Framework) yields one number while using the .NET CF routine on the same data yields a different checksum number. Why is this so and do you have any ideas how to solve this?
Blaine Fields |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Feb 08, 2006 10:36 am Post subject: |
|
|
The CheckSum function uses the String.GetHashcode() function to generate the checksum. Unfortunately Microsoft have changed the algorithm for this between .NET 1.0 and 2.0 and possibly also on CF. For this reason we will provide a new function in the next release that does not depend on this. For backward compatibility we will keep the CheckSum function in some form.
Note this is a convenience function only and you could also easily implement your own. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Feb 15, 2006 9:47 pm Post subject: |
|
|
This has now been fixed in Version 2.2.0. The CheckSum function no longer uses String.Hashcode() - instead it uses the same algorithm as VS2003 (.NET 1.1) to generated the hashcode. This means the behaviour is now the same for all platforms. _________________ Infralution Support |
|
Back to top |
|
|
|