TLL Init Chunk was created to make integration simple. Init chunk is encrypted file containing all necessary configuration for TLLInterface object. To integrate TLL, just 2 steps are required:
- Generate init chunk through our toolbox
- Use init chunk within your application according to steps below
You can generate init chunk file from TLL toolbox.
1. Generate init chunk (file or code snippet)
- Start LibaryToolbox2.exe
- Create or open license signing key for your application
- Click “Start easy integration” button in the first tab
- Fill the configuration values (more info below)
- Click “Generate C# or VB snippet” or “Generate file”
- You can store init chunk as file in application resources or you can store it in byte array variable (snippet button).
- Use it in your project
This way will TLL encrypt configuration values like your public key or license registry storage path. You can optionally create TLLInitChunk object, manually fill its properties within your source code and pass it to TLLInterface object constructor.
2. Integrate TLL using init chunk into your application
- Add TLL init chunk file to your project’s resources (to ensure that init chunk is compiled into exe/dll file)
- Optionally, you can generate byte array source code snippet for C# or VB from the toolbox instead of using application resources
- Add using/imports code
- C#: Using TreeksLicensingLibrary2.EasyIntegration;
- VB: Imports TreeksLicensingLibrary2.EasyIntegration
- Create new instance of TLLInterface object using added resource and password
- C#: TLLInterface tlli = new TLLInterface(YourAppNamespace.Properties.Resource.ChunkFilename, “password”);
- VB: Dim tlli As New TLLInterface(My.Resources.ChunkFileName, “password”)
- When using code snippet, simply use byte array from snippet instead of file in app resources as TLLInterface constructor parameter
- Use Register method to activate licenses generated by toolbox within your own user interface.
- Use ShowRegistrationForm method to display registration window designed by us (this can save hours of developer’s work, especially when integrating TLL Activation Server).
- Use MyLicense property to determine actual license status
- When no license is present, MyLicense object will be null (nothing)
TLL Registration form
TLL contains customizable registration window you can easily call and display within your application. Read more about registration form here.
TLL Init Chunk must be used properly to mitigate security risks. Init chunk purpose is to hide configuration values (your app public key, license registry storage path, TLL license data etc.) from prying eyes and make integration to your project simple. However, when you simply load it from the file at runtime, any other user can generate his own init chunk and replace yours and crack your application.
Shortened, properly used init chunk increases security and makes integration easier. Without proper usage, it decreases security. Please follow these rules:
- Always integrate chunk file somewhere into your compiled code (resources or byte array)
- Use your own custom password for init chunk
- NEVER initialize TLLInterface using chunk file directly (by passing IO.File.ReadAllBytes result to the TLLInterface constructor)