If you have a vendor whose solution you like, and the price is
affordable, go with it. Otherwise, with the above-summarized
information, any developer possessing an above-room-temperature IQ
could write their own.
Best of luck,
Peter
Sorry to say this but...that was a rude and incorrect thing to say!
Licensing is not a "do it yourself" project in my book unless you are
selling shareware programs as a hobby. Sure, you could make some half-
arsed encrypting system that sent a web request to a server and then
processed/saved the reply yourself easily - but that is only part of the
solution.
You need a way to include other things in a license "component" in order
for it to work correctly:
- Different Key Types (demo/trial/perm)
- Fixed/Specific Product Versions
- Concurrent Usages (maybe 1 key for several computers)
- Shared License Keys (multiple computers but only 1 at a time)
- Other Product Specific Settings (Max. # of something, specific server
ti can connect to, specific features that were purchased, etc.)
This all needs to be designed so that it cannot be changed by the user,
but can still be decoded (which means no HASH algo) by the program so it
can use the information. You will want to get access to the username,
product version, etc. in your application.
Here is an example of what I mean by this.
Example License Format:
-------------------------------------
[Application Name]
[Version]
[Application Specific Features or Information]
[LicenseType (perm/demo)]
[exp. date if demo]
[encrypted license key of HD+MAC address]
[encrypted CRC value of entire license key]
-------------------------------------
Example License Key:
-------------------------------------
SomeApp
1.2.0.0
EditorFeature|DesignerFeature|QueryFeature|ServerFeature=215.128.56.12
PERM
00/00/0000
ab86af7e890da8ab78c98ea9bd8ffa7e
1e67a01f3bc1
-------------------------------------
The above sample would be the actual license key that the user receives.
It has human readable information but it cannot be changed because of the
CRC of the entire key on the end. The encrypted key (HD+MAC) is used to
verify it is valid as well.
Also, you need to have more then a simple method call like bool
CheckLicenseKey() in your code otherwise it will be easy to hack it and
perform a simple JMP around the check - or even worse find out how to
generate your own keys! Once it is "known" to one user how to
break/hack/generate a key it is known to everyone thanks to the WWW. An
ideal solution would somehow encrypt the binary code of the application
so it would be hard to determine where the license checks are made (and I
mean CHECKS and not check since you should perform multiple checks of a
license key in different key areas.) Also, it should not set some global
variable like bKeyValid because that is a VERY simple thing to hack.
There are a lot of companies out there that make licensing software and
most software developers who need a decent solution use them for a reason
- because it takes more then an "above-room-temperature IQ" to get it
done correctly.
If you want half-arse: do it yourself.
If you want it done right: purchase something.
Of all the things you could skimp on during development the licensing is
not one of them because once it is hacked it becomes freeware!
I do not develop/selllicensing software so I am not trying to suggest any
particular product that is out there.