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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Serial Number!

Status
Not open for further replies.

Bernini

Programmer
Oct 26, 2004
98
MT
Hi

i would like to create a serial number to activate my application.

I don't know if this is to far fetched but i would like that the key stores certain parameters!

1. Each should be assigned as per client (so the key should identify the client.)
2. The key should store the number of allowed installations!
3. Should have an expiry date
4. number of users!

Is it possible to create a key (25-digit max) storing this information!?

Tahnks
B
 
If this is going to be used in a data solution (ie: Database) I would highly recomend not using logic in your primary key. Let it just be an incremental integer.

As for what you are looking for, sure, it's just a string of data. You could even store the data in seperate fields and just print it out in the concatinated form of your choice.

-Rick

----------------------
 
As ThatRickGuy mentioned, you could do anything you want within the 25 digits, according to the formulation of the question, verbatim.

If I interpret your question, you are concerned with
1. the conversion of alpha information to numeric digits, or
2. you prefer to have an encription to protect your information (expiry date, number of users, etc.)

or any other issue that you have in mind.

If you could kindly elaborate the issue that concerns you, users with the appropriate experience could answer your question more directly.

Happy programming.
 
thanks PC888...

Well, i think you've understood my question quite well! I need both the conversion of the data plus the encryption!

This will first of all protect me, and will help create serial numbers which will limit my application according to what the client buys!

Thanks
Nick
 
Sorry that I haven't got back sooner.
If you arrange your 25 digits as follows:
8 digits for expiry date (20050101 for January 1, 2005 etc)
4 digits for number of installations (up to 9999)
4 digits for number of users (up to 9999)
that leaves you with (25-8-4-4)=9 digits for your user identification. You could have a table of user id conversion to get alphanumeric names.
Since you have 9 digits for the user id, you could use 3 of the 9 digits for a redunduncy check, that would reduce the risk of serial numbers being modified or tampered with, and that still leaves you with up to 1 million user ids to work with.

As for the encryption part, I have done some work before, but I believe it would be best to leave that to the experts on encryption, depending on how secure you need the system to be. If medium security is sufficient, you can look up the standard encryption schemes available, or make another post for recommendations.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top