I’ve made a cocoa mac application which needs to check if a serial number/license key is correct, i’m unsure what type of algorithms would be the best for this.
Lets say i have this serial number:
4829-1234-4321-1234-4326-5232 or any set of 4 numbers.
I was thinking about using an algorithm like if the first set of the license key is divisible by 5, second by 10, third by 24…. but i’m not sure if this is the best way to go about it.
I would also need to generate the keys in PHP.
Any help is appreciated
There are a number of options available in this arena. One option I would consider is implementing partial serial number verification (http://www.brandonstaggs.com/2007/07/26/implementing-a-partial-serial-number-verification-system-in-delphi/) The link is written for Delphi developers but the concept is a good one and can be implemented in any language.