471,618 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Help with creating license code


I would like to have some input on creating license codes. I do not really
wish to use any standard methods (like -lic files). What I need to do is the

Our application will store information about the license in the user
database. I am not really afraid that the customers will try to crack the
licenses, but some level of security is needed. If the software is licensed,
the customer can install the software on multiple machines without further
licensing procedures (application checks license in the database)

The license holder will have a name and the license will expire at a certain
date. By using these two variables I want to create a license key that is
relatively easy to tell over the phone, for example xxxx-xxxx-xxxx.

The license code needs to hold information about the expiration date, but
not the customer name. However, the user has to type his customer name on
the screen and this name must be checked against the license code somehow.
If the license is correct, I store the expiration date in the database.

Any ideas? I have been trying 4 or 5 commercial products, but none really
fits my needs. I guess that this could be achieved rather easily by not to
many lines of code.

Thanks for your input!

/Jonas Bergman
Dec 28 '05 #1
2 2254
You could probably hash the licence holder's name (e.g. with MD5 /
SHA1) and use, say, every fourth digit of the hash as the basis of the
licence code (first 8 digits, or whatever); you could then encode the
expiration date as a 16-bit number and perhaps perform some symmetric
transform on it for security, and use the hex representation of the
result as the last four digits. Then, you can check the licencee name
by hashing the entered name and comparing the relevant digits; the
expiration date can then be decoded if it matches.

That arrangement would be secure enough to ward off casual fraudsters,
though I wouldn't rely on it if I *really* distrusted my too-tech-savvy

Dec 28 '05 #2
Have you had a look at Infralution's Licensing System? You should be
able to do everything listed above with it - if not we always welcome
feedback and will provide assistance.

You can get more information and download an evaluation version at:


Grant Frisken

Dec 28 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

34 posts views Thread by Michael Foord | last post: by
20 posts views Thread by titi | last post: by
3 posts views Thread by Roy Chastain | last post: by
51 posts views Thread by mojosam | last post: by
reply views Thread by BigAl.NZ | last post: by
38 posts views Thread by ifti_crazy | last post: by
31 posts views Thread by Mark Dufour | last post: by
reply views Thread by Simon Anderson | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.