I have a client that is looking to generate unlock codes for a cd and has given me a calculation that is new to me. There are a number of numbers associated with each CD, i.e. CD id, CD serial #, hardware code. Based on the info entered, they've provided a calculation that can be used to generate an unlock code, ie. Example: ABCD-12AZ-RTG5-02GH-CSWZ-76TG.
I was wondering if this is possible using PHP and where I might get more information on such a topic. Here are two parts to the calculation; (4) The serial # of the CD (6 digits) is converted to the 20 bits binary code. This looks like it should be simple using decbin(); Here's another part; (11) The 112 bits are divided by 8 bits, then there are 14 bytes. These 14 bytes is calculated by EX-OR. Then the result is added to the last, and the total data becomes 120 bit. Not too sure about dividing bits and EX-OR. Where could I get more information about doing something like this. Once again, I'm not sure if this is possible using PHP and any other additional information would be greatly appreciate. Also let me know if the entire calculation would help. Thanks, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php