• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

How to generate CD Keys

Where can I find an algorithm to generate and include CD Keys in my applications?

In C# or C++

CD Keys like Microsoft uses for it's applications (ex. XX35-KJ32-PLKF-K43J)
0
evo_x
Asked:
evo_x
  • 3
  • 3
1 Solution
 
StephanLead Software EngineerCommented:
Take a look at this: http://ellipter.com/

This will give you an insight how you can generate your keys.
0
 
AndyAinscowCommented:
I don't know if there is a 'standard'.  In fact if one thinks about it then a standard way could be abused.

You will need code to create a key AND code to check the key the user enters is valid.

I suggest you need to think about what information you require in the key.  What format the key has.  What sort of extra padding you want in the key to give a constant length.  Possibly one or two chars for a checksum type of validation.  Finally an encryption routine to then hide things.

I've done things like having an expiry date as 5 digits, the 1st in char 4, 2nd in char 11....
0
 
evo_xAuthor Commented:
I need to include the product id, version number and reseller id
any method would be good as an example.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
evo_xAuthor Commented:
AndyAinscow: That is what I am looking for but that is a commercial library, I want to implement my own instead of paying $250
0
 
AndyAinscowCommented:
OK.
What I did was sit down with a piece of paper and list what I required.  Worked out how many digits I needed, then jumbled the digits around.  A couple of hours and everything was coded.
0
 
evo_xAuthor Commented:
And what encryption method should I use? which is free of course for commercial use.
0
 
AndyAinscowCommented:
Whatever you wish.

This is one possibility:
http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm

0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now