Introduction

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:

  1. Generate init chunk through our toolbox
  2. 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)

  1. Start LibaryToolbox2.exe
  2. Create or open license signing key for your application
  3. Click “Generate init chunk for easy integration” button in the first tab
  4. Fill the configuration values (more info below)
  5. Click “Generate C# or VB snippet” or “Generate file”
    1. You can store init chunk as file in application resources or you can store it in byte array variable (snippet button).
  6. 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.

Init chunk configuration explanation

You can configure multiple properties of init chunk. You can find the object definition here. Below more description:

  • Mode
    • Standalone: TLL Core WITHOUT activation server
    • With licensing API server: For those who purchased TLL activation server
  • Init chunk password
    • This is password used to encrypt init chunk file content. You’ll have to pass it to TLLInterface object.
  • Your public key
    • Automatically pre-filled, public key used for license information verification
  • TLL License
    • Put here your developer license to avoid TLL demo notification.
    • If you set developer license in the “Developer license” tab of TLL Toolbox, this information will be filled automatically
    • You can keep this empty for testing purposes
  • License registry scope
    • Scope of registry used to save end user’s license
    • Can be HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE
    • Remember, you need administrator permission to store license in HKEY_LOCAL_MACHINE
  • License registry key
    • The path of registry key to store license
    • Always should start with backslash “\”
  • License registry value name
    • Registry value name to store end user’s license
  • License obfuscation password
    • Password used to encrypt end user’s license in registry
  • API URL
    • URL of activation server
  • Product ID
    • This value is generated by activation server

   

2. Integrate TLL using init chunk into your application

Feel free to check our C# and VB.NET examples to see code required to implement TLL.

  1. Add TLL init chunk file to your project’s resources (to ensure that init chunk is compiled into exe/dll file)
    1. Optionally, you can generate byte array source code snippet for C# or VB from the toolbox instead of using application resources
  2. Add using/imports code
    1. C#: Using TreeksLicensingLibrary2.EasyIntegration;
    2. VB: Imports TreeksLicensingLibrary2.EasyIntegration
  3. Create new instance of TLLInterface object using added resource and password
    1. C#: TLLInterface tlli = new TLLInterface(YourAppNamespace.Properties.Resource.ChunkFilename, “password”);
    2. VB: Dim tlli As New TLLInterface(My.Resources.ChunkFileName, “password”)
    3. When using code snippet, simply use byte array from snippet instead of file in app resources as TLLInterface constructor parameter
  4. Use Register method to activate licenses generated by toolbox within your own user interface.
  5. Use ShowRegistrationForm method to display registration window designed by us (this can save hours of developer’s work, especially when integrating TLL Activation Server).
  6. Use MyLicense property to determine actual license status
    1. 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.

Security notice

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)