
At this time I am not sure if you need it since you have NUMBER available to use. I have not finished DATE as of this article but will do so later. In NUnit, the NUMBER and CHARACTER types are used extensively. The various token types are NUMBER, CHARACTER, and DATE. It also uses hex numbers and bits for the template definition. The second token sets the product to use a token of p with a value of 2. The first token sets the version to use a token of v with a value of 1. This example shows how to create a license key that has two tokens. " -xxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx" " -xxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx" + Gkey.LicenseTemplate = " vvvvppppxxxxxxxxxxxx" + These two characters are the only two that are reserved.Ī sample of the template and the resulting license key for Byte values and Decimal numbers are: The c character defines a checksum character. The x character states just a filler or random number. The key template has two characters that are defined by default. The next version will not be aligned on a byte boundary so it will be harder to decipher. This version requires that all fields be on the byte boundary so it is a little easier to decipher the end result. Bits are used when there will be more fields and the encoding will be harder to decipher.

Bytes are used when the key will be a simple key that does not require a lot of fields and data encoding. Two types of templates are Bytes and Bits. The license key template is a string of characters that represent what actions will be taken when the key is created and decoded. Most keys are base 16 for all of the numbers. The license keys are created with either a base 10 or base 16 integer data set. Another site that does License keys is SP extreme or Open License. There are various ways to create keys this article shows one such way. In this project, I created an interactive test tool to test the various features of the library. Since I wanted to put this code in CodeProject I adhered to using NUnit as my unit testing tool, NDoc as my documentation tool, and FxCop as my code analyzer. With a license key you can turn features on and off for each customer, have product feature expire at the end of a demo period, or any other type of enabling or disabling you desire. This is used not only for selling commercial products but also in deploying enterprise applications.

With this program and library you can create the key and later read it in to validate that the correct key was used. The keys that are generated show various pieces of information, such as product, customer and version. As you know when you get a software package it usually requires a license key.

This article is about a license key generation program.
