home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Binary_Bot54213292002.psc / VLBot / CDKeyDecode.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-13  |  1.1 KB  |  43 lines

  1. /* Battle.net CD-Key Algorithm Source Code ⌐ YobGuls (yobguls@yobguls.2ndmail.com) 2001
  2.  * This source will decode a CD-Key from either Starcraft or Diablo 2
  3.  * into the three values that need to be sent to Battle.net to verify it
  4.  * The DecodeCDKey function works for either D2 or SC keys currently */
  5.  
  6. #ifdef __cplusplus
  7. extern "C"
  8. {
  9. #endif
  10.  
  11. /* DecodeCDKey
  12.  * This function will take in the CD-Key as a string, and output the three
  13.  * values.  It will also return true or false depending upon whether or not
  14.  * the key is valid for an installation. */
  15.  
  16. BOOL DecodeCDKey(LPCTSTR, DWORD *, DWORD *, DWORD *);
  17.  
  18. /* DecodeStarcraftKey
  19.  * Decodes amd checks a Starcraft CD-key */
  20.  
  21. BOOL DecodeStarcraftKey(LPSTR);
  22.  
  23. /* DecodeD2Key
  24.  * Decodes and checks a Diablo 2 CD-key */
  25.  
  26. BOOL DecodeD2Key(LPSTR);
  27.  
  28. /* Get_Hex_Value
  29.  * Converts a number into an ASCII hexadecimal digit */
  30.  
  31. char Get_Hex_Value(DWORD);
  32.  
  33. /* Get_Num_Value
  34.  * Converts an ASCII hexadecimal digit into a number */
  35.  
  36. int Get_Num_Value(char);
  37.  
  38. void HashData(LPVOID lpSource, int nLength, LPVOID lpResult);
  39.  
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43.