
How to make license keys? - Jumboo
What is the best way to make license keys for an application? (C ++)
======
Academ1c
Maybe you should look for a DRM system?

------
arcticwombat
A license key is just a string you can easily track, and depending on delivery
of the key you might want to make it easy to type.

If it's all downloadable/copy-paste, just use any GUID generator.

If you're relying on people to type it in, I'd go with alpha-numeric, cleaning
up ambiguous characters (Such as 1/l/I) and keeping the length moderately
short, no more than 6-8 characters split up into two sections with a space in
between.

It's better to limit tries than make a crazy long key that no one can type.

That's based on you asking how to "make" license keys.

If you're also asking for help how to verify them offline for example, it's a
different story.

~~~
Jumboo
Thank. I think I need to ask how to verify these keys?

~~~
arcticwombat
There are different ways to do it depending on if the client is online or if
it has to be offline, and using a dongle or not (Uncommon today).

If the client will be online you can just do an API call and check on start,
if there's no key show a splash screen with the option of entering a key.

If there IS a key, send it (securely) to the API and do something depending on
the result.

Here's a good article for how you could do it for offline keys:
[https://www.brandonstaggs.com/2007/07/26/implementing-a-
part...](https://www.brandonstaggs.com/2007/07/26/implementing-a-partial-
serial-number-verification-system-in-delphi/)

It's written for Delphi/Object Pascal but the principles can be implemented in
any language.

~~~
Jumboo
Thanks for the link. I think this is what I need.

~~~
Academ1c
You should write your own algorithm for creating the KeyGen. Also, think about
how the key will be checked. The key can be tied to the MAC address of the
computer. But this way has some pros and cons.

~~~
Jumboo
Thanks for the tip. I found several ways to generate keys. But I don’t know
how to organize the process of checking and locking the keys when they are
transferred to third parties.

~~~
Academ1c
Maybe you should try a ready-made licensing system? Try ready-made DRM-systems
(Digital rights management). You can find a lot of information on Wikipedia.
There are examples of free and paid programs. Also, you can use a ready-to-use
key-making tool. ArmDot for example. As usual, such programs are paid. But
maybe you can find something free on the GitHub. Good luck!

~~~
Jumboo
Thanks for the tip. I will study this question in more detail.

