I have already written a self-contained Licensing Class that allows a license key to encrypt information related to the product, such as edition, whether it's a trial and when that trial expires, 8 possible feature values that could be used to enable or disable functionality, a serial number, and so forth. This class has been successfully integrated both into a previous project for which I had written it as well as into one of my own Applications.