Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I generate a licence number?

Status
Not open for further replies.

LinuXelite

Programmer
Jun 21, 2002
150
0
0
CA
Hi everybody!

I want to generate a licence number for my program.
I want to include some informations:
a. Licence type (licencepack, oem, etc)
b. Number of licence (5-10-15-20)
c. A checksum

I can acheive this by encryptinhg a string, say LIC0001,OEM,15 -> output= 41dfaf321daaddd.
By doing a MD5, I can add the first 7 numbers of the MD5 as a checksum.

Anyway its not very advance and there are many problems related to this. Im sure there are proper ways to generate licence number.

Do y have an idea? Im waiting for your advice.

I use Delphi, mysql with standar component.

Thank you very much!


 
I dont think there is any 'proper way' to do this,

I get users to provide a User Name and use this to Generate the "Licence number". The problem being that You neeed to be able to predict the activation code but you also need to make sure that a single code to activate any copy of an application is not distributed.
This approach is also flawed in that a known user name and code can be distributed together with pirated copies of your software, This is true for Apps the like of 3D Studio, AutoCAD, Photoshop and Full Acrobat.

Unless you start tying the software to the local hardware ala 'Microsoft XP' then there is no way around this, except to change your algorythm now and again. but that will annoy Users who need to upgrade your application.

The tightest protection I have seen is on Siemems PLC programming software, where they supply high level incrypted licence keys on a floppy, these must be loaded from the floppy to activate a copy of the application and 'put back' when the software is no longer required on that machine. The floppys are not IBM formatted and so cannot be copied (I dont know how they do this).

I have never seen a practical method of numbering copies of an application. Think about it. you dont want to have to compile each copy seperatly, and you probobly would want to be able to provide the software on a website (as I do).

My advice is to use a username Key and dont worry too much people are more likly to try to rip off something Well known than a new offering.

Steve



 
There is another possible way. I have been told by the software I use for this that alot of companies already do this, such as Borland, Microsoft, Adobe, etc., is making trial versions of their software. What that means, is you set a certain amount of days to use your software. It depends on how long you want them to utilize your software before they register. I found a great program that does this called 1Way. What it does is creates a DLL file in the directory where your program is located. You simply call the functions in the DLL to do what sort of Shareware strategies 1Way has found to work best and presto! I will be using it personally, once my software is finalized. And, it eliminates having me to "re-invent the wheel".
Their website URL is I have checked out other programs and this appeared to be the most useful for me. Another strategy is a function in their DLL called "GetCDriveSerial", which takes the number from the customer's hard drive serial number, which Microsoft did with XP Home and Pro Edition. That means each time they upgrade their hard drive, they have to update the software. So, It depends on how critical your software is. 1Way has a "Shareware" version for you to check out and it's well worth it. Hope that helps. :)
 
I found a solution by myself..

I use an excellent opensource component to encrypt a string with blowfish and md5. I use an incremental id in the begenning of the string so that I always get a totally different licence number.

01,pack,25,21

licence #1, pack, 25 clients and valid for 21 days.

I get someting like
ffsd77asd88f-7a47?f

This technique is simple and strong :eek:)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top