By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,949 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,949 IT Pros & Developers. It's quick & easy.

Help with creating license code

P: n/a

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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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.