Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NF and CF CheckSum differences

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Blaine Fields
Guest





PostPosted: Wed Feb 08, 2006 3:09 am    Post subject: NF and CF CheckSum differences Reply with quote

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

PostPosted: Wed Feb 08, 2006 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Feb 15, 2006 9:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group