Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the simplest license key generator I can develop myself in 1 day? [closed]

This is just to keep honest customer honest.

like image 214
Teo Choong Ping Avatar asked Nov 12 '09 06:11

Teo Choong Ping


3 Answers

Is there any operation system limitations? I think following approach will be quite simple:

  1. Choose a way of getting machine id. For example this can be MachineGuid registry entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography. (Generating a unique machine id)

  2. Define features which you are planning to licence and the way to identify them. You can just name them. If your product is simple it can be a feature itself.

  3. Create public/private key pair.

  4. Retrieve customer's machine id in some way. You can ask him to send it manually or you can create a simple utility or it can be a special command in your application.

  5. Combine feature id and machine id in some way and sign result with your private key. For example you can make that combination by concatenation. In that case result string may look like this: "YourApplicationName-12345678-9abc-def0-1234-56789abcdef0"

  6. Signature will be a sequence of bytes, so if you want to pass it in text form you should make some conversion to it. For example you can convert signature to Base64 string. The combination of feature id, machine id and signature of their combination will be a licence key!

  7. Include public key in your application distribution and add logic for licence verification. If licence is valid then you should check that it's being used on correct machine and in correct application.

More on public/private key operations here.

Please tell if something is unclear and I will try to provide detailed answer.

EDIT: I'm sure that implementation of all of this can be done in 1 day, but I agree with others who suggest you to use existing solutions. There are plenty for different platforms and programming languages.

like image 173
okutane Avatar answered Sep 19 '22 01:09

okutane


Why don't you just get one from someone else. If you are only willing to put one day in, you aren't going to get a good product.

like image 24
Mufrah Avatar answered Sep 21 '22 01:09

Mufrah


A license key won't stop the customer from installing you software several times unless the key is tied to a hash of the server name etc.

like image 42
Daniel Avatar answered Sep 18 '22 01:09

Daniel