English 中文(简体)
Enable/disable code access through license key - Application versioning
原标题:

I have written a POS application, and now i want to create different versions of it. Something like a basic version, a premium version and a Full version. So if a client pays more they get more features in the same application. Is it possible that i could keep one standard application but features in my application get enabled / disabled depending upon what license key user enters. Restrict parts of code that can be executed only if a certain key was entered.

Any ideas guys...

问题回答

There are many ways to do this, all of them breakable if skilled people are willing to put the time into it ;-) However, depending on the solution you choose, it will require progressively more work in your end, so be realistic and choose wisely.

For the actual license key, I highly recommend that you generate it using a standard public-private key encryption scheme such as rsa. That is, you create a license key text string that contains the name of the user (so you can track illegally shared license keys) and information about which code should be active. Encrypt the license on your end using the private key and distribute the app with the public key included. When the app starts, you read the license key and decrypt it using the public key. This will make it virtually impossible for people to modify or generate fake keys.

Now for the actual activation of code, here are two options I have used in production code: either simply include flags in the license key saying which parts of the code should be active and activate it using basic if then statements. Alternatively, depending on your programming language, you can dynamically load pieces of code from the license key making those parts of the code unusable without a proper key file (I did this in java with a custom class loader).... however, this last solution requires much much more work than the first, so think things through before you start designing your solution.





相关问题
Version numbering basics? [closed]

Suppose I have a web application with some basic functions. I want to market it. So I would like to assign a version number - something like 0.0.1. What I want to know is are there any constraints ...

Versioning problem

people. I hope you can help me. In our development process we have a unix based file server with SFTP access (let’s call it A). This server store a large numer of xslt files we are working on. The ...

ECM - Document Control Management / Versioning and CMS

I anticipate this is going to be a very broad question however I shall endevour to be as concise as possible without divulging too much project critical information. For quite some time I have been ...

How do other development teams approach version numbers?

Our application is quite mature, and thus we are up to version 16. However, this can give the impression that the software is old and out of touch (how many commercial applications are there with a ...

SVN avoid storing passwords in plain text?

Under a bare bones setup for SVN on windows (without using VisualSVN), as per the instructions, the passwords are to be entered in the passwd file. Does SVN provide a way to encrypt or atleast mask ...

热门标签