 |
Introduction |
 |
Graphical User Interface |
 |
GUI Elements |
 |
Licensing System |
 |
SDK |
 |
Definitions |
 |
Tools |
 |
Testing |
 |
Examples |
 |
Ordering |
 |
Support and Contact |
|
 |
 |
 |
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>
/// 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];
}
|