Contents 

Introduction
Welcome
System Requirements
Graphical User Interface
Overview
Main Panel
Menu/Bar Items
GUI Elements
Assembly List
Assembly Properties
License File Name
License Generator
License Information
Lock Settings
Master Key
Protection Settings
Licensing System
Understanding The License System
Hardware ID
Hardware Lock
License File
Locks
Master Key
SDK
General Information
IntelliLock.Licensing.dll
IntelliLock.LicenseManager.dll
IntelliLockDB.dll & System.Data.SQLite.DLL
Definitions
Mapping File
Merge Assembly
Obfuscation
Pack Assembly
Tools
License Check
Hardware ID Check
Stack Trace Deobfuscator
License Reactivator
Testing
Library - Test Environment
Examples
Lock An Assembly
Unlock An Locked Assembly
Floating Licensing
Global
Intranet
Server Validation
License Server Validation
Ordering
Register Online
License Agreement
Why register?
Support and Contact
Technical Support
Contact
Command Line Parameters
Visual Studio Add-In

IntelliLock Online Help

Prev Page Next Page
IntelliLock.LicenseManager.dll
 

- IntelliLock.LicenseManager enables you to:

  • Open IntelliLock project files
  • Create license files
  • Read license files
  • Easily encrypt and sign data using the master key stored in your project file (asymmetric encryption techniques are used here)
  • Easily decrypt data and verify its signature using the master key stored in your project file (asymmetric encryption techniques are used here)
  • Generate a reactivation code for invalidated license files
- You can freely use this library on a server or any other environment.




How To Example Code:
        /// <summary>
        /// Open IntelliLock Project
        /// </summary>
        public IntelliLock.LicenseManager.ProjectFile ReadProjectFile(string proj_filename)
        {
             return new IntelliLock.LicenseManager.ProjectFile(proj_filename);
        }

        /// <summary>
        /// Create License File
        /// </summary>
        public byte[] CreateLicenseFile(string proj_filename)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            myproject.LicenseInformation.Add("MyKey", "MyValue");
            return IntelliLock.LicenseManager.LicenseGenerator.CreateLicenseFile(myproject);
        }

        /// <summary>
        /// Create License File
        /// </summary>
        public void CreateLicenseFile(string proj_filename, string license_filename)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            myproject.LicenseInformation.Add("MyKey", "MyValue");
            IntelliLock.LicenseManager.LicenseGenerator.CreateLicenseFile(myproject, license_filename);
        }
        
        /// <summary>
        /// Create Hardware Locked License File
        /// </summary>
        public void CreateLicenseFile(string proj_filename, string license_filename)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            myproject.LicenseInformation.Add("MyKey", "MyValue");
            myproject.HardwareLock_Enabled = true;
            myproject.HardwareLock_BIOS  = true;
            myproject.HardwareLock_CPU = true;
            myproject.HardwareLock_HDD = true;
            myproject.HardwareLock_MAC = false;
            myproject.HardwareLock_Mainboard  = true;
            myproject.HardwareLock_OS = false;
            myproject.Hardware_ID = "B745-C55C-1B94-6250-E98E-9BA0";
            IntelliLock.LicenseManager.LicenseGenerator.CreateLicenseFile(myproject, license_filename);
        }


        /// <summary>
        /// Read License File
        /// </summary>
        public IntelliLock.LicenseManager.ProjectFile ReadLicenseFile(string proj_filename, string license_filename)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            return myproject.ReadLicenseFile(license_filename);
        }

        /// <summary>
        /// Read License File
        /// </summary>
        public IntelliLock.LicenseManager.ProjectFile ReadLicenseFile(string proj_filename, byte[] license)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            return myproject.ReadLicenseFile(license);
        }

        /// <summary>
        /// Generate Reactivation Code
        /// </summary>
        public string GenerateReactivationCode(string proj_filename, string deactivation_code, string hardware_id)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);

            //use the same hardware components you used to deactivate the license
            return LicenseReactivator.GenerateReactivationCode(myproject, deactivation_code, hardware_id, true, false, true, true, true, false);
        }

        /// <summary>
        /// Encrypt And Sign Data
        /// </summary>
        public byte[] EncryptAndSignData(string proj_filename, byte[] mydata)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            return IntelliLock.LicenseManager.DataSignHelper.EncryptAndSignData(myproject, mydata);
        }

        /// <summary>
        /// Verify Signature
        /// </summary>
        public bool VerifySignature(string proj_filename, byte[] mydata)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            return IntelliLock.LicenseManager.DataSignHelper.VerifySignature(myproject, mydata);
        }

        /// <summary>
        /// Decrypt Data
        /// </summary>
        public byte[] DecryptData(string proj_filename, byte[] mydata)
        {
            IntelliLock.LicenseManager.ProjectFile myproject = new IntelliLock.LicenseManager.ProjectFile(proj_filename);
            if (IntelliLock.LicenseManager.DataSignHelper.VerifySignature(myproject, mydata))
            {
                return IntelliLock.LicenseManager.DataSignHelper.DecryptData(myproject, mydata);
            }
            else
                return new byte[0];

        }