LIMAN SDK
Introduction
LIMAN SDK is a library of functions to add license protection to software applications. It offers an affordable, easy-to-use and industrial-strength solution against unauthorized use and duplication of software. It is distributed in the form of static and shared (dynamic) libraries ready to be embedded into a host application. It provides a framework to generate encrypted license keys and a set of functions to verify their validity. It is also equipped with protective features against tampering.
LIMAN SDK enables the creation and verification of
- machine-locked licenses
- user-locked licenses
- time-limited licenses for trials and subscription based software
- feature-based licenses
The licenses issued by LIMAN can also be configured to
- be valid for a specific group of products
- be valid for a specific version in the sense that major upgrades would require new licenses
- possess varying capacities restricting the data quantity processed.
- support custom features
The licensing framework is based on asymmetric cryptography, where license generation and verification require different keys. In asymmetric cryptography, key size is the primary measure of the cryptographic strength of the encryption. Although the keys are related mathematically (which is why they are often referred to as keypairs), it is virtually impossible to guess one with the knowledge of the other.
Most commonly, the private key is used to encrypt/sign the licenses, whereas the public key is used to decrypt/verify them. In such a framework, the public key would be embedded into the software application whereas the private key would be kept secret outside the software application.
Getting Started
This section gives an overview of the LIMAN SDK, instructions for getting started, sample applications and details concerning contact and support information. It also presents two utility applications that you will need
- to generate product-specific keypairs
- to generate product-specific license-keys to be sent out to your customers
- to determine hostid on client machines for generating node-locked licenses
Note
These utility applications would meet most of your requirements in managing the licenses you are distributing. You can extend their source-code and rebuild to better suit your needs.
Download
Obtain the distribution package specific to your platform from our web site https://www.baroks.com/downloads. The names of distribution packages for supported operating systems (OS) are listed below. The tag x.y
stands for the version of LIMAN SDK.
OS | Platform Directory | Library Format | Installer |
Windows 32-bit | win32x86 | Static (.lib) | liman_core-x.y-win32x86.tar.gz |
Windows 64-bit | win64x86 | Static (.lib) | liman_core-x.y-win64x86.tar.gz |
Linux 32-bit | linux32x86 | Static (.a) | liman_core-x.y-linux32x86.tar.gz |
Linux 64-bit | linux64x86 | Static (.a) | liman_core-x.y-linux64x86.tar.gz |
Obtain Your License Key
You can purchase a LIMAN SDK license key from
or request a time-limited trial license from
Once your order is completed, you will receive a confirmation email and a download link to your license key. The download file contains the license key embedded in a C/C++ code snippet. Follow the instructions in Installation section to incorporate it into LIMAN SDK.
Prepare the Development Environment
Prepare your development environment based on your platform.
-
Windows/VisualStudio: download and install Visual Studio Community https://visualstudio.microsoft.com/vs/community/
-
Windows/MinGW: download and install MinGW from the following links
- https://www.mingw.org (for Windows 32-bit)
- https://mingw-w64.org (for Windows 64-bit)
- During MinGW installation, make sure to include gcc compiler toolchain
- Prepend
c:/MinGW/path/to/gcc
directory to your %PATH% environment variable. Typically gcc is located underCopy to Clipboard
Note
Windows allows environment variables to be configured permanently at both the User level and the System level, or temporarily in a command prompt.To temporarily set environment variables, open Command Prompt and use the set command:
Copy to Clipboardor
Copy to ClipboardTo permanently modify the default environment variables, click Start and search for
Edit Environment Variables
, or openSystem
properties,Advanced System Settings
and click theEnvironment Variables
button. In this dialog, you can add or modify User and System variables. To change System variables, you need non-restricted access to your machine (i.e. Administrator rights).
- Linux: Linux operating systems usually comes with GCC pre-installed. To verify if the compiler is installed on the machine, run the following command in the terminalIf the compiler is found, this will return the information about the compiler version. Otherwise, use the following commands to install gcc on Ubuntu/DebianCopy to ClipboardOn Fedora/RedHatCopy to ClipboardCopy to Clipboard
- OSX: To set up a ‘C’ programming environment on Mac/OSX system, you have two options:
- Command Line Tools for Xcode
- Download Command Line Tools for XCode from https://developer.apple.com/downloads/index.action. You will need an Apple developer ID.
- After the file is downloaded on the machine, double click and follow the wizard and install the file. Always keep the default settings as suggested by the installation wizard.
- After the installation process, open a terminal and run
gcc -v
command to check if everything is successfully installed.
- Homebrew package manager
- Install homebrew (if not already installed)Copy to Clipboard
- Run the following brew commandsCopy to Clipboard
- After the installation process, open a terminal and run
gcc -v
command to check if everything is successfully installed.
- Install homebrew (if not already installed)
- Command Line Tools for Xcode
Installation
In this setup, a 64-bit Linux installation is assumed. For other platforms, the steps would be identical except for package names and system commands to use for building, copying, etc…
-
Locate the
liman-x.y-linux64x86.tar.gz
file in your download folder. Copy this file into an installation directory of your choice (eg./opt
) using the following command:Copy to Clipboard - Change working directory to
/opt
and decompressliman-x.y-linux64x86.tar.gz
usingtar -xzvf
command. This will create the root LIMAN SDK directoryliman-x.y
under/opt
. It is your installation directory.The following sub-directories will be placed within the installation directory.Copy to Clipboard-
apps/
: contains project and source files for the sample applications in -
bin/
: contains utility scripts for license management. -
lib/
: contains platform independent jar files to link with java applications -
lib/
: core LIMAN library, utility executables. -
include/
: contains include or header files, defining the function prototypes, needed to compile applications in different programming languages. -
license/
: contains the license file (e.g.usr_liman_lic.c
) required to use LIMAN SDK. -
doc/
: contains documentation files.
-
-
Set the environment variable
LIMAN_ROOT
to point to the installation directory and update system pathCopy to ClipboardNote
To execute these lines automatically at logon, append these lines to the end of your startup script (.bashrc or .bash_profile for bash shell). Alternatively, update$LIMAN_ROOT/bin/limsetenv.sh
script with the above lines and have your startup script (.bashrcor
.bash_profile
) source from that file with the following lineCopy to Clipboard - Change working directory to
$LIMAN_ROOT/lib/linux64x86.
The contents of this directory areCopy to Clipboard - Save the license-file you obtained from
baroks.com
as$LIMAN_ROOT/license/usr_liman_lic
.cCopy to ClipboardNote
~/Downloads/usr_XXXXXXXX_lic.c is the file you obtained from baroks.com - Build the LIMAN SDK library with the following command.This step will link the core LIMAN libraryCopy to Clipboard
lib/linux64x86/libliman_core.a
against your license-file and create a licensed version LIMAN SDK. After the build is complete, you will have the following files in the working directoryThis step completes the creation of LIMAN SDK library and utility executables integrated with your license-key. Take a note of the roles of the files in this folderCopy to ClipboardCopy to Clipboard
Building a Product-Specific LIMAN SDK
The LIMAN SDK library lib/libliman_sdk.a
you just built is not yet ready to be used to protect a particular application. In order to achieve that, the following component needs to be created and linked against lib/libliman_sdk.a
.
Once this step is completed, you will have a custom build of LIMAN SDK to protect your product.
Note
This is the step where a product-specific keypair is required. You can create as many keypairs as you need, and protect as many products as you need.
For the purposes of this illustration, we will embed LIMAN SDK into a hypothetical product called TESTAPP
.
Use limutil
tool to generate a new product-license-base
. A product-license-base
is a set of attributes and files associated with a specific product pertaining to license protection. In particular, it involves
- A string of at most 12 characters that uniquely identifies a product. This could be specified by the user or be generated randomly by
limutil
. - The method of cryptography to be used. The default is RSA encryption.
- A private and public keypair of specified size associated with the product. Default key size is 2048.
To display the list of available command-line options of limutil
, type.
NoteThis step considers a hypothetical product/application called
TESTAPP
for license-protection.
Run limutil
to generate the product-license-base. Change the default key size to a different value if required. An RSA key size of 2048 bits is the default. This key size is considered safe by US-NIST until the year 2030. See this special publication for further information.
TESTAPP's
keypair is written to subfolder
./TESTAPP. The folder will contain four files in it.Two of the files have extension .key
in which private and public keys are encoded in hexadecimal format. The other two contain the same keys embedded in a C/C++ function ready to be included in a C/C++ application.
The file TESTAPP_public_key.c
is one of the components to be embedded into the product-specific LIMAN SDK and will eventually be linked against TESTAPP
application.
The file TESTAPP_private*
.* files will continue to live outside TESTAPP
application and will be used by only the license generator (See License Generation section).
- The other component that goes into the product-specific LIMAN SDK is the LIMAN SDK license key sent to you via email. This key is embedded in a C/C++ function which should be compiled and linked to core LIMAN library (
libliman_core.a
). If you haven’t received your LIMAN SDK license key, please visit https://www.baroks.com/try to get it. Your license key will be sent to you via email. Once you receive it, copy it into$LIMAN_ROOT/license
directory and perform the following step to create the product-specific librarylibliman_<PRODUCT>_sdk.a
. Note that we continue to assume that productTESTAPP
is being targeted.This final step will build the product-specific LIMAN SDKCopy to Clipboardlibliman_TESTAPP_sdk.a
.TESTAPP
application will eventually be linked against this library to enable LIMAN powered license protection. In a Java or .NET application,libliman_TESTAPP_sdk.so
(on Linux),libliman_TESTAPP_sdk.dylib
(on OSX), orlibliman_TESTAPP_sdk.dll
(on Windows) would be used.For housekeeping purposes,libliman_TESTAPP_sdk.a
is placed inlib/TESTAPP
directory so that it is not mixed-up with other libraries built for other products or platforms. If you decide to switch to another private and public key pair, you will need to rebuildlibliman_TESTAPP_sdk.a
with a new keypair as described in Building a Product-Specific LIMAN SDK section. It is recommended to use different keypairs for different products or different versions of the same product.
Note If product code is not specified explicitly, then
limutil
will generate a random string of 12-characters to be associated with the product-license-base generated. To see this, execute the followingProduct-id is ‘FC16ADA16362’. Written private key in FC16ADA16362/FC16ADA16362_private.key. Written public key in FC16ADA16362/FC16ADA16362_public.key. Written private key as C/C++ code in FC16ADA16362/FC16ADA16362_private_key.c. Written public key as C/C++ code in FC16ADA16362/FC16ADA16362_public_key.c.When the product code is generated randomly, it will take a different value in each run. Therefore, the string value you see will be different than the above. To confirm the product-license-base forCopy to ClipboardFC16ADA16362
was generated successfully, execute the following command.Copy to Clipboard
You will need to repeat this setup process for each product you want to protect with LIMAN SDK. In a hypothetical 3-product business, you will typically have the following directory structure after the setup. The product codes are assumed to be randomly generated by limutil
. Running the following two more times
three product-license-bases, each with its own subfolder, will be created.
To build the LIMAN SDK for all products, run the following
The product-specific LIMAN libraries are now ready to be linked against by their respective products.
Your products should now be linked against the associated libliman_<PRODUCT>_sdk.a
and the license generator limgen
should use the private key associated with that product. For instance, the product 52ADB5129389
should be linked against libliman_52ADB5129389_sdk.a
and limgen
should use 52ADB5129389_private.key
to generate licenses.
Note The
libliman_<PRODUCT>_sdk.a
library is meant to be used with a specific product, it should not be used for protecting multiple products.
License Generation
License generation involves creating an encrypted license key that contains the following information
- A string with
LIMPAR_MAX_LEN_PRODUCTID
characters that uniquely identifies a product (like a barcode, brand name and/or model number) - An integer platform identifier that specifies the platform or architecture. (e.g. Windows 32-bit, Linux 64-bit, etc..) for which the license is good for.
- An integer specifying the major version number.
- An integer specifying the minor version number.
- An integer specifying the size of license (e.g. when the software’s capabilities should vary with license size. A typical example is when a database application could process at most a prespeficed number of records for a given license size).
- An integer constant specifying the type of license (e.g. educational, trial, commerical).
- An integer specifying the number of concurrent seats/users allowed by the license (reserved for future use).
- An integer specifying the expiry date of the license in
YYYYMMDD
format (optional). - A string with
LIMPAR_MAX_LEN_SERIAL
characters specifying the serial number for the product (optional). - A string with
LIMPAR_MAX_LEN_UUID
characters specifying a universally unique identifier for the product (optional). - A string with
LIMPAR_MAX_LEN_HOSTID
characters specifying the host-id of the host machine (optional). - A byte (
char
) array of 4 elements to specify additional features using bitmasks (optional). Each byte can characterize 8 features.
LIMAN SDK has two data types which needs to be initialized before any license-related operation could be performed.
pLIMENV
is the LIMAN SDK environment object. This object is created withpLIMLIC
is the LIMAN SDK license object which can be created with one of the three functions
The steps to create a license key can be summarized as below
- Create a new environment instance by calling
lim_create_env()
. - Read the private key associated with the product by calling
lim_read_private_key()
. - Create an empty license instance by calling
lim_create_lic()
. - Call
lim_load_lic()
after setting up the following arguments to be passed- Product code.
- Platform identifier.
- Major and minor version number.
- License size (optional).
- License type (optional).
- An expiry date (optional).
- A serial number created with
lim_gen_rkey()
or your own serial-generation code. It should have at mostLIMPAR_MAX_LEN_SERIAL
characters. - Create a random UUID for the license with
lim_gen_uuid()
(optional). It should have at mostLIMPAR_MAX_LEN_UUID
non-hyphen characters. - The host-id of the node (machine) the license will be installed on. This is required only if the license will be node-locked. Request this information from your customer.
- Set up optional features (optional).
- Call
lim_write_lickey()
to export the license key to a file. - Call
lim_free_lic()
andlim_free_env()
to free the memory used. - Send the license key to your customer.
These steps are illustrated in sample application limgen
. It is located in apps/c/limgen
directory. Run the following command to build it
After the build is complete, type
to display the list of available command-line options. The setup of the license key is achieved by setting associated command-line options. You can use this utility for most of your license generation needs. Alternatively, you can modify it to suit your needs or extend it to a GUI application.
Using Bitmasks to Enable Optional License Features
Your application may have different features and functionalities which require to be licensed separately. LIMAN SDK allows you to enable a maximum of 32 optional features in a license key. This is achieved by setting the elements of a byte (char
) array with 4 elements to specific bitmask values during license generation and thereby enabling/disabling required features. Each byte (char
) is assigned to a 8-bit bitmask value in the range [0..255]. By default all elements are set to zero. After this array is set up, it is passed to lim_load_lic() to incorporate these features into the license key.
We illustrate the workings with a hypothetical case for a single byte. It is straightforward to extended the same logic to four bytes. Suppose your application offers 8 different techniques for sorting records of data. Because they have varying efficiencies and requirements, you may want to price them individually. This will require you to set up the license keys with feature-availability information. Your customers may want to purchase one
or some
or all
or none
of these features depending on your licensing model. Let the following be the sort techniques offered by your hypothetical application
- Quick Sort
- Merge Sort
- Heap Sort
- Insertion Sort
- Intro Sort
- Block Sort
- Shell Sort
- Bubble Sort
For a particular license key, availability of each feature could be represented with a specific bit in a byte of license data. Consider the following byte (char
) variable and how each bit is designated to a specific sorting method (feature). This 8-bit data block would be one of the components of the input passed to the license generation phase. So, it has to be set up according to customer’s license requirements. Initially, all bits are set to zero (empty) meaning that none of the sorting methods (features) are available to the license holder.
Suppose your customer requested a license with Quick Sort, Heap Sort and Block Sort. This is accomodated by switching on the bits associated with these features in a single byte (char) variable.
Note
Specific bits of a byte can be modified by ( | ) , (~) , (^) and (&) operators.
This 8-bit data block corresponds to binary number $ (00100101)_2 $ which equals $ 2^0 + 2^2 + 2^5$ = $ 1 + 4 + 32 = 37$ in base-10. In $LIMAN_ROOT/include/liman.h
symbolic constants are provided for each bit position
A code similar to the following could be used to set up desired features. This task would typically be performed by the license generation application, e.g. limgen. This particular code turns on bits 0, 2 and 5 in feature[0] and enables the associated sort methods. In this example, other features feature[1], feature[2] and feature[3] are also set to various values for illustration purposes.
After the license key is generated and sent to the customer, the application will check the available features by a code snippet similar to the following.
You can test this scenario by running limgen
using lg_testapp.sh
, which is the license generation script for TESTAPP application. This script will create a license keyfile, TESTAPP/usr_<product>.lic, with properties specified in lg_testapp.sh
.
Note
If command line option
–hostid
option was specified, you would have seen a warning that the license is not valid, implying that it is good only for the client machine with hostid=. This is a message you will see for all node-locked licenses you generate for client machines.
This license is written into TESTAPP
folder and ready to be used with testapp application. Running testapp
with specified license file will produce the given output. As indicated by the application log, only licensed sort methods are confirmed to be available with the specified license
See testapp.c implementation for details, especially how other features are checked to control the flow of the code.
License Key Format
The licenses generated by LIMAN SDK will be in the following format. They contain an encryption of the data specifying license properties. The actual license key is the string contained within BEGIN LICENSE KEY
and END LICENSE KEY
lines. The creation of license keys require your private key, which should remain private on your local site and should not be shared with the outside world. The validation will be performed by your application using the public key embedded in libliman_TESTAPP_sdk.a
.
Contact and Support Information
LIMAN SDK is licensed and supported by Baroks Inc. (https://www.baroks.com). General information regarding LIMAN SDK can be found at the Baroks website
https://www.baroks.com/document
For technical support, send questions to
Questions regarding licensing information or other information about Baroks products can be sent to
Appendix A: Error Codes
The list of errors in LIMAN SDK along with a brief description is given in the following. The symbolic constants are defined in include/liman.h header file.
Symbolic Constant | Description |
LIMERR_FIRST_CARD | Specified file was not found |
LIMERR_MEMORY | Error in allocating memory |
LIMERR_FILE_NOT_FOUND | Specified file was not found |
LIMERR_INVALID_NULL | Specified reference is invalid or null |
LIMERR_INVALID_LICENSE | Specified license is invalid |
LIMERR_ENVAR_NOT_FOUND | Specified environment variable is not found |
LIMERR_LICENSE_EXPIRED | License has expired |
LIMERR_LICENSE_NOT_LOADED | License is not loaded |
LIMERR_INVALID_DOMAIN | Domain parameters are invalid |
LIMERR_INVALID_PRODUCT_CODE | Specified product code is invalid for the given license |
LIMERR_INVALID_USER | Current user is invalid for the given license |
LIMERR_INVALID_PRODUCT_VERSION | Specified product version is invalid for the given license |
LIMERR_INVALID_PLATFORM | Specified platform code is invalid for the given license |
LIMERR_INVALID_ENVAR | Specified environment variable is invalid |
LIMERR_INVALID_ENV | Specified environment is invalid |
LIMERR_INVALID_INPUT | Specified input is invalid |
LIMERR_UNABLE_TO_OPEN_FILE | Failed to open specified file |
LIMERR_INVALID_LICENSE_FILE_NAME | Specified license file is invalid |
LIMERR_OPERATION_FAILED | An internal crypto-operation has failed |
LIMERR_PRIVKEY_FILE_NOT_FOUND | Private key file is not found |
LIMERR_PUBKEY_FILE_NOT_FOUND | Public key file is not found |
LIMERR_NOT_SUPPORTED | Feature is not supported |
LIMERR_INVALID_KEYLEN | The key length is invalid |
LIMERR_NOT_AVAILABLE | Requested information is not available |
LIMERR_INVALID_KEY | Key under operation is invalid |
LIMERR_SHORT_KEY | Key under operation is too short |
LIMERR_BAD_ERRORCODE | Specified error code is invalid |
LIMERR_INTERNAL | An internal error has occurred. Contact your vendor |
LIMERR_ENV_NOT_READY | LIMAN environment is not ready |
LIMERR_ALREADY_LOADED | Specified object is already loaded |
LIMERR_SYSTEM | Platform specific system error |
LIMERR_CLOCK_SETBACK | Clock setback detected |
LIMERR_INVALID_HOST | Host is invalid or hardware has changed |
LIMERR_KEYS_NOT_LOADED | Private and Public keys are not loaded |
LIMERR_PRIVKEY_FILE_EXISTS | Private key file ‘usr_private.key’ already exists |
LIMERR_PUBKEY_FILE_EXISTS | Public key file ‘usr_public.key’ already exists |
LIMERR_KEYSIZE_MISMATCH_ENV | The size of specified key does not conform the environment |
LIMERR_RANGE_TYPE_CODE | Specified type-code is out-of-range |
LIMERR_RANGE_PRODUCT_CODE | Specified product-code is out-of-range |
LIMERR_RANGE_MAJOR_VERSION | Specified major-version is out-of-range |
LIMERR_RANGE_MINOR_VERSION | Specified minor-version is out-of-range |
LIMERR_RANGE_SIZE_CODE | Specified size code is out-of-range |
LIMERR_RANGE_PLATFORM_CODE | Specified platform code is out-of-range. |
LIMERR_INVALID_HOSTMASK | Host is invalid or hardware has changed |
LIMERR_BUFFER_TOO_LONG | Buffer is too long |
LIMERR_MKDIR_FAILED | Cannot create directory |
LIMERR_PRIVKEY_NOT_LOADED | Private key is not loaded |
LIMERR_PUBKEY_NOT_LOADED | Public key is not loaded |
LIMERR_FILE_TOO_SMALL | Specified file is too small |
LIMERR_FILE_IO | File I/O error |
LIMERR_INPUT_TOO_BIG | Specified input is too big |
LIMERR_LAST_CARD | Placeholder for last error |
Modules
LIMAN SDK Functions
Functions Table
|
Encrypts or decrypts arbitrarily large byte-streams. More… |
|
Constructs a new LIMAN environment. More… |
|
Loads the specified license with specified properties. It is recommended to use symbolic constants to specify constant values as given in |
|
Destroys the specified license. More… |
|
Deletes the specified license. More… |
|
Destroys the specified LIMAN environment. More… |
|
Deletes the specified LIMAN environment. More… |
|
Prints the license data to an output string buffer. More… |
|
Gets 16-byte hash of input buffer. More… |
|
Gets 12-byte hash of input buffer. More… |
|
Gets 8-byte hash of input buffer. More… |
|
Gets sha/sha3 hash of input buffer. More… |
|
Gets hash of license. More… |
|
Gets hash of library. More… |
|
Gets the hostid (fingerprint) of current host. More… |
|
Gets the MAC address of |
|
Gets the cpu-id of current host. More… |
|
Get LIMAN SDK version identifiers. More… |
|
Get version string. More… |
|
Generates a random key of specified length. More… |
|
Generates a new UUID (version 4) in non-canonical form, which is a series of 32 hexadecimal characters with no hyphens. In version 4, the 13’th character is ‘4’ and 17’th character is one of 8, 9, A, or B. More… |
|
Generates a random hexadecimal product code. More… |
|
Gets key pairs in hex. More… |
|
Loads a new RSA key pair of specified size to LIMAN environment. More… |
|
Generates an RSA key pair of specified size and writes them to files |
|
Generates an RSA key pair of specified size and writes them to files usr_private.key and usr_public.key respectively. More… |
|
Writes the RSA key pair associated with specified LIMAN environment. More… |
|
Writes the RSA key pair associated with specified LIMAN environment as a C array. More… |
|
Calculate and get the base16 encoded hash of the bytes of the given file. More… |
|
Reads the public key from specified file. More… |
|
Constructs a new blank license to be set up with lim_load_lic() More… |
|
Reads the private key from specified file. More… |
|
Loads the public key string to LIMAN environment. More… |
|
Loads the private key string to LIMAN environment. More… |
|
Parses the imported RSA key pair into the LIMAN environment. More… |
|
Validates specified license instance. More… |
|
Returns the number of days to expiration. More… |
|
Returns the product code associated with the license. More… |
|
Returns whether the specified feature is available in the given license. More… |
|
Generates a flag indicating whether the license is valid or not. More… |
|
Returns the license key parsed into a license instance. More… |
|
Creates a new license key from the specified license file. More… |
|
Creates a new license instance from license key. More… |
|
Copies the license data into a string. More… |
|
Copies the license string to the specified license instance. More… |
|
Returns a flag to specify if keys are loaded to LIMAN environment. More… |
|
Writes the license key to specified file. More… |
|
Writes the license key as a C/C++ function into specified file. More… |
|
Sign the license. More… |
|
Verify the license data. More… |
|
Sets license requirements. More… |
|
Returns the major version associated with the license. More… |
|
Returns the minor version associated with the license. More… |
|
Returns the platform identifier associated with the license. More… |
|
Returns the size associated with the license. More… |
|
Returns the license identifier. More… |
|
Returns the type associated with the license. More… |
|
Set the RSA encryption direction. More… |
|
Write a secret message (encrypted with public key) to a file. This message can be decrypted with the associated private key. More… |
|
Get the current userid on host. More… |
|
Get the current dmiuuid on host. More… |
|
Converts the specified non-canonical UUID into canonical form, i.e. groups of 8,4,4,4,12 characters as in xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. More… |
Detailed Description
License Manager SDK Functions.
This group contains API functions in LIMAN SDK.
Function Documentation
◆
|
---|
Validates specified license instance.
|
◆
|
---|
Converts the specified non-canonical UUID into canonical form, i.e. groups of 8,4,4,4,12 characters as in xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
|
◆
|
---|
Copies the license data into a string.
Remarks |
◆
|
---|
Copies the license string to the specified license instance.
|
◆
|
---|
Constructs a new LIMAN environment.
|
◆
|
---|
Constructs a new blank license to be set up with lim_load_lic()
construct a new license
|
◆
|
---|
Creates a new license key from the specified license file.
|
◆
|
---|
Creates a new license instance from license key.
|
◆
|
---|
Returns the number of days to expiration.
|
◆
|
---|
Deletes the specified LIMAN environment.
|
◆
|
---|
Deletes the specified license.
|
◆
|
---|
Encrypts or decrypts arbitrarily large byte-streams.
|
◆
|
---|
Destroys the specified LIMAN environment.
|
◆
|
---|
Destroys the specified license.
|
◆
|
---|
Generates an RSA key pair of specified size and writes them to files _private.key and _public.key respectively.
|
◆
|
---|
Generates an RSA key pair of specified size and writes them to files usr_private.key and usr_public.key respectively.
|
◆
|
---|
Generates a random hexadecimal product code.
|
◆
|
---|
Generates a random key of specified length.
|
◆
|
---|
Generates a new UUID (version 4) in non-canonical form, which is a series of 32 hexadecimal characters with no hyphens. In version 4, the 13’th character is ‘4’ and 17’th character is one of 8, 9, A, or B.
|
◆
|
---|
Gets the cpu-id of current host.
|
◆
|
---|
Get the current dmiuuid on host.
|
◆
|
---|
Gets 12-byte hash of input buffer.
|
◆
|
---|
Gets 16-byte hash of input buffer.
|
◆
|
---|
Gets 8-byte hash of input buffer.
|
◆
|
---|
Gets the hostid (fingerprint) of current host.
|
◆
|
---|
Gets key pairs in hex.
|
◆
|
---|
Gets hash of library.
|
◆
|
---|
Returns the license key parsed into a license instance.
|
◆
|
---|
Gets hash of license.
|
◆
|
---|
Gets the MAC address of i'th device of current host.
|
◆
|
---|
Gets sha/sha3 hash of input buffer.
|
◆
|
---|
Get the current userid on host.
|
◆
|
---|
Get LIMAN SDK version identifiers.
|
◆
|
---|
Get version string.
|
◆
|
---|
Returns whether the specified feature is available in the given license.
|
◆
|
---|
Calculate and get the base16 encoded hash of the bytes of the given file.
|
◆
|
---|
Generates a flag indicating whether the license is valid or not.
|
◆
|
---|
Returns a flag to specify if keys are loaded to LIMAN environment.
|
◆
|
---|
Loads the specified license with specified properties. It is recommended to use symbolic constants to specify constant values as given in liman.h .
|
◆
|
---|
Loads the private key string to LIMAN environment.
|
◆
|
---|
Returns the major version associated with the license.
|
◆
|
---|
Returns the minor version associated with the license.
|
◆
|
---|
Loads a new RSA key pair of specified size to LIMAN environment.
|
◆
|
---|
Parses the imported RSA key pair into the LIMAN environment.
|
◆
|
---|
Returns the platform identifier associated with the license.
|
◆
|
---|
Prints the license data to an output string buffer.
|
◆
|
---|
Returns the product code associated with the license.
|
◆
|
---|
Reads the private key from specified file.
|
◆
|
---|
Reads the public key from specified file.
|
◆
|
---|
Sets license requirements.
|
◆
|
---|
Set the RSA encryption direction.
|
◆
|
---|
Sign the license.
|
◆
|
---|
Returns the size associated with the license.
|
◆
|
---|
Returns the type associated with the license.
|
◆
|
---|
Verify the license data.
|
◆
|
---|
Writes the RSA key pair associated with specified LIMAN environment.
|
◆
|
---|
Writes the RSA key pair associated with specified LIMAN environment as a C array.
|
◆
|
---|
Writes the license key to specified file.
|
◆
|
---|
Writes the license key as a C/C++ function into specified file.
|
◆
|
---|
Write a secret message (encrypted with public key) to a file. This message can be decrypted with the associated private key.
|
PRECALL void STDCAL |
lim_set_lasterr (pLIMENV pEnv, int nErr)
Set the specified error as the last error (for debug purposes) More… |
---|---|
PRECALL int STDCALL |
lim_get_errmsg (pLIMENV pEnv, int nErrCode, char *szMessage)
Retrieves the error message associated with an error code listed in Appendix A. More… |
PRECALL const char *STDCALL |
lim_errmsg (pLIMENV pEnv, int nErrCode)
Returns the error message associated with an error code listed in Appendix A. More… |
PRECALL const char *STDCALL |
lim_errmacro (pLIMENV pEnv, int nErrCode)
Returns the macro symbol associated with an error code listed in Appendix A. More… |
PRECALL const char *STDCALL |
lim_errctx (pLIMENV pEnv)
Returns the context of the last error thrown. More… |
Detailed Description
LIMAN Error Handling Functions.
Function Documentation
◆
|
---|
Returns the context of the last error thrown.
lim_errctx
|
◆
|
---|
Returns the macro symbol associated with an error code listed in Appendix A.
lim_errmacro
|
◆
|
---|
Returns the error message associated with an error code listed in Appendix A.
lim_errmsg
|
◆
|
---|
Retrieves the error message associated with an error code listed in Appendix A.
lim_get_errmsg
|
◆
|
---|
Set the specified error as the last error (for debug purposes)
|
Symbolic Constants
Modules
Host identifiersList of host identifiers to create locked licenses. |
---|
Miscellenous constantsList of constants. |
String lengthsList of string lengths for various data. |
Error codesError codes in LIMAN SDK. See Appendix A for descriptions. |
License propertiesList of license properties. |
Sample symbolic constants to set up a licenseThis is a list of symbolic constants provided in |
Version constantsVersion tags can be integer values in 0-255 range. |
Host identifiers
Macros
#define | LIMPAR_MACID 1 |
#define | LIMPAR_CPUID 2 |
#define | LIMPAR_DISKID 4 |
#define | LIMPAR_HOSTNAME 8 |
#define | LIMPAR_USERID 16 |
#define | LIMPAR_DMI 32 |
Detailed Description
List of host identifiers to create locked licenses.
Macro Definition Documentation
◆ LIMPAR_CPUID#define LIMPAR_CPUID 2 |
---|
CPU identifier
|
◆LIMPAR_DISKID#define LIMPAR_DISKID 4 |
---|
HardDisk identifier
|
◆ LIMPAR_DMI#define LIMPAR_DMI 32 |
---|
DMI identifier (Linux only)
|
◆ LIMPAR_HOSTNAME#define LIMPAR_HOSTNAME 8 |
---|
Hostname
|
◆ LIMPAR_MACID#define LIMPAR_MACID 1 |
---|
MAC identifier
|
◆ LIMPAR_USERID#define LIMPAR_USERID 16 |
---|
Username
|
#define | LIMPAR_MAX_PATH 2048 |
#define | LIMPAR_MAX_CHARS_PER_LINE 256 |
#define | LIMPAR_MAX_LIC_STRING_LEN 4096 |
#define | LIMPAR_NUMBER_OF_ERROR_CODES 52 |
#define | LIMPAR_MAX_LENGTH_ERROR_MESSAGE 32 |
#define | LIMPAR_NUM_FEATURE_SLOTS 4 |
Detailed Description
List of constants.
Macro Definition Documentation
◆ LIMPAR_MAX_CHARS_PER_LINE#define LIMPAR_MAX_CHARS_PER_LINE 256
|
---|
Max-allowable characters per line in text input files |
◆ LIMPAR_MAX_LENGTH_ERROR_MESSAGE#define LIMPAR_MAX_LENGTH_ERROR_MESSAGE 32 |
---|
Max length of error messages |
◆ LIMPAR_MAX_LIC_STRING_LEN#define LIMPAR_MAX_LIC_STRING_LEN 4096 |
---|
Max characters of license string
|
◆ LIMPAR_NUM_FEATURE_SLOTS#define LIMPAR_NUM_FEATURE_SLOTS 4 |
---|
Max number of feature slots
|
◆ LIMPAR_NUMBER_OF_ERROR_CODES#define LIMPAR_NUMBER_OF_ERROR_CODES 52 |
---|
Max number of error codes, see LIMERR_LAST_CARD
|
#define | LIMPAR_MAX_LEN_PRODUCTID 12 |
#define | LIMPAR_MAX_LEN_UUID 16 |
#define | LIMPAR_MAX_LEN_SERIAL 24 |
#define | LIMPAR_MAX_LEN_HOSTID 12 |
#define | LIMPAR_MAX_LEN_USERID 12 |
#define | LIMPAR_MAX_LEN_LICID 16 |
Detailed Description
List of string lengths for various data.
Macro Definition Documentation
◆ LIMPAR_MAX_LEN_LICID#define LIMPAR_MAX_LEN_LICID 16 |
---|
The length of license-id string
|
◆ LIMPAR_MAX_LEN_SERIAL#define LIMPAR_MAX_LEN_SERIAL 24 |
---|
Max allowable length of serial string
|
Error codes
Macros
#define | LIMERR_FILE_TOO_SMALL 49 |
#define | LIMERR_FILE_IO 50 |
#define | LIMERR_INPUT_TOO_BIG 51 |
#define | LIMERR_LAST_CARD 52 |
Detailed Description
Error codes in LIMAN SDK. See Appendix A for descriptions.
Macro Definition Documentation
◆ LIMERR_ALREADY_LOADED#define LIMERR_ALREADY_LOADED 30 |
---|
Specified object is already loaded |
◆ LIMERR_BAD_ERRORCODE#define LIMERR_BAD_ERRORCODE 27 |
---|
Specified error code is invalid |
◆ LIMERR_BUFFER_TOO_LONG#define LIMERR_BUFFER_TOO_LONG 45 |
---|
Buffer is too long |
◆ LIMERR_CLOCK_SETBACK#define LIMERR_CLOCK_SETBACK 32 |
---|
Clock setback detected |
◆ LIMERR_ENV_NOT_READY#define LIMERR_ENV_NOT_READY 29 |
---|
LIMAN environment is not ready |
◆ LIMERR_ENVAR_NOT_FOUND#define LIMERR_ENVAR_NOT_FOUND 6 |
---|
Specified environment variable is not found |
◆ LIMERR_FILE_IO#define LIMERR_FILE_IO 50 |
---|
File I/O error
|
◆ LIMERR_FILE_NOT_FOUND#define LIMERR_FILE_NOT_FOUND 3
|
---|
Specified file was not found |
◆ LIMERR_FILE_TOO_SMALL#define LIMERR_FILE_TOO_SMALL 49 |
---|
Specified file is too small |
◆ LIMERR_FIRST_CARD#define LIMERR_FIRST_CARD 1 |
---|
Specified file was not found
|
◆ LIMERR_INPUT_TOO_BIG#define LIMERR_INPUT_TOO_BIG 51 |
---|
Specified input is too big |
◆ LIMERR_INTERNAL#define LIMERR_INTERNAL 28 |
---|
An internal error has occurred. Contact your vendor |
◆ LIMERR_INVALID_DOMAIN#define LIMERR_INVALID_DOMAIN 9 |
---|
Domain parameters are invalid |
◆ LIMERR_INVALID_ENV#define LIMERR_INVALID_ENV 15 |
---|
Specified environment is invalid |
◆ LIMERR_INVALID_ENVAR#define LIMERR_INVALID_ENVAR 14 |
---|
Specified environment variable is invalid |
◆ LIMERR_INVALID_HOST#define LIMERR_INVALID_HOST 33 |
---|
Host is invalid or hardware has changed |
◆ LIMERR_INVALID_HOSTMASK#define LIMERR_INVALID_HOSTMASK 44 |
---|
Host is invalid or hardware has changed |
◆ LIMERR_INVALID_INPUT#define LIMERR_INVALID_INPUT 16 |
---|
Specified input is invalid
|
◆ LIMERR_INVALID_KEY#define LIMERR_INVALID_KEY 25 |
---|
Key under operation is invalid |
◆ LIMERR_INVALID_KEYLEN#define LIMERR_INVALID_KEYLEN 23
|
---|
The key length is invalid |
◆ LIMERR_INVALID_LICENSE#define LIMERR_INVALID_LICENSE 5 |
---|
Specified license is invalid |
◆ LIMERR_INVALID_LICENSE_FILE_NAME#define LIMERR_INVALID_LICENSE_FILE_NAME 18 |
---|
Specified license file is invalid |
◆ LIMERR_INVALID_NULL#define LIMERR_INVALID_NULL 4
|
---|
Specified reference is invalid or null |
◆ LIMERR_INVALID_PLATFORM#define LIMERR_INVALID_PLATFORM 13 |
---|
Specified platform code is invalid for the given license
|
◆ LIMERR_INVALID_PRODUCT_CODE#define LIMERR_INVALID_PRODUCT_CODE 10 |
---|
Specified product code is invalid for the given license
|
◆ LIMERR_INVALID_PRODUCT_VERSION#define LIMERR_INVALID_PRODUCT_VERSION 12 |
---|
Specified product version is invalid for the given license |
◆ LIMERR_INVALID_USER#define LIMERR_INVALID_USER 11 |
---|
Current user is invalid for the given license |
◆ LIMERR_KEYS_NOT_LOADED#define LIMERR_KEYS_NOT_LOADED 34 |
---|
Private and Public keys are not loaded
|
◆ LIMERR_KEYSIZE_MISMATCH_ENV#define LIMERR_KEYSIZE_MISMATCH_ENV 37 |
---|
The size of specified key does not conform the environment |
◆ LIMERR_LAST_CARD#define LIMERR_LAST_CARD 52 |
---|
Placeholder for last error
|
◆ LIMERR_LICENSE_EXPIRED#define LIMERR_LICENSE_EXPIRED 7 |
---|
License has expired |
◆ LIMERR_LICENSE_NOT_LOADED#define LIMERR_LICENSE_NOT_LOADED 812 |
---|
License is not loaded |
◆ LIMERR_MEMORY#define LIMERR_MEMORY 2 |
---|
Error in allocating memory
|
◆ LIMERR_MKDIR_FAILED#define LIMERR_MKDIR_FAILED 46 |
---|
Cannot create directory |
◆ LIMERR_NOT_AVAILABLE#define LIMERR_NOT_AVAILABLE 24 |
---|
Requested information is not available
|
◆ LIMERR_NOT_SUPPORTED#define LIMERR_NOT_SUPPORTED 22 |
---|
Feature is not supported |
◆ LIMERR_OPERATION_FAILED#define LIMERR_OPERATION_FAILED 19 |
---|
An internal crypto-operation has failed |
◆ LIMERR_PRIVKEY_FILE_EXISTS#define LIMERR_PRIVKEY_FILE_EXISTS 35 |
---|
Private key file ‘usr_private.key’ already exists |
◆ LIMERR_PRIVKEY_FILE_NOT_FOUND#define LIMERR_PRIVKEY_FILE_NOT_FOUND 20 |
---|
Private key file is not found |
◆ LIMERR_PRIVKEY_NOT_LOADED#define LIMERR_PRIVKEY_NOT_LOADED 47 |
---|
Private key is not loaded |
◆ LIMERR_PUBKEY_FILE_EXISTS#define LIMERR_PUBKEY_FILE_EXISTS 36 |
---|
Public key file ‘usr_public.key’ already exists |
◆ LIMERR_PUBKEY_FILE_NOT_FOUND#define LIMERR_PUBKEY_FILE_NOT_FOUND 21 |
---|
Public key file is not found |
◆ LIMERR_PUBKEY_NOT_LOADED#define LIMERR_PUBKEY_NOT_LOADED 48 |
---|
Public key is not loaded |
◆ LIMERR_RANGE_MAJOR_VERSION#define LIMERR_RANGE_MAJOR_VERSION 40 |
---|
Specified major-version is out-of-range |
◆ LIMERR_RANGE_MINOR_VERSION#define LIMERR_RANGE_MINOR_VERSION 41 |
---|
Specified minor-version is out-of-range |
◆ LIMERR_RANGE_PLATFORM_CODE#define LIMERR_RANGE_PLATFORM_CODE 43 |
---|
Specified platform code is out-of-range. |
◆ LIMERR_RANGE_PRODUCT_CODE#define LIMERR_RANGE_PRODUCT_CODE 39 |
---|
Specified product-code is out-of-range |
◆ LIMERR_RANGE_SIZE_CODE#define LIMERR_RANGE_SIZE_CODE 42 |
---|
Specified size code is out-of-range |
◆ LIMERR_RANGE_TYPE_CODE#define LIMERR_RANGE_TYPE_CODE 38 |
---|
Specified type-code is out-of-range |
◆ LIMERR_SHORT_KEY#define LIMERR_SHORT_KEY 26 |
---|
Key under operation is too short |
◆ LIMERR_SYSTEM#define LIMERR_SYSTEM 31 |
---|
Platform specific system error |
◆ LIMERR_UNABLE_TO_OPEN_FILE#define LIMERR_UNABLE_TO_OPEN_FILE 17 |
---|
Failed to open specified file |
#define | LIMPAR_PLATFORM 101 |
#define | LIMPAR_CODE 102 |
#define | LIMPAR_MAJORVER 103 |
#define | LIMPAR_MINORVER 104 |
#define | LIMPAR_SIZE 105 |
#define | LIMPAR_TYPE 106 |
#define | LIMPAR_SEATS 107 |
#define | LIMPAR_EXPIRY 108 |
#define | LIMPAR_RESERVED 109 |
#define | LIMPAR_FEATURE0 110 |
#define | LIMPAR_FEATURE1 111 |
#define | LIMPAR_FEATURE2 112 |
#define | LIMPAR_FEATURE3 113 |
#define | LIMPAR_SERIAL 114 |
#define | LIMPAR_USERINFO 115 |
#define | LIMPAR_HOSTID 116 |
Detailed Description
List of license properties.
Macro Definition Documentation
◆ LIMPAR_CODE#define LIMPAR_CODE 102 |
---|
Reserved |
◆ LIMPAR_EXPIRY#define LIMPAR_EXPIRY 108 |
---|
License expiry date in YYYYMMDD format |
◆ LIMPAR_FEATURE0#define LIMPAR_FEATURE0 110 |
---|
License feature-0 bitmask |
◆ LIMPAR_FEATURE1#define LIMPAR_FEATURE1 111 |
---|
License feature-1 bitmask |
◆ LIMPAR_FEATURE2#define LIMPAR_FEATURE2 112 |
---|
License feature-2 bitmask |
◆LIMPAR_FEATURE3#define LIMPAR_FEATURE3 113 |
---|
License feature-3 bitmask |
◆ LIMERR_UNABLE_TO_OPEN_FILE#define LIMERR_UNABLE_TO_OPEN_FILE 17 |
---|
Failed to open specified file |
◆ LIMPAR_HOSTID#define LIMPAR_HOSTID 116 |
---|
License hostid |
◆ LIMPAR_MAJORVER#define LIMPAR_MAJORVER 103 |
---|
License Major version |
◆ LIMPAR_MINORVER#define LIMPAR_MINORVER 104 |
---|
License Minor version |
◆ LIMPAR_PLATFORM#define LIMPAR_PLATFORM 101 |
---|
License Platform identifier |
◆ LIMPAR_RESERVED#define LIMPAR_RESERVED 109 |
---|
Reserved |
◆ LIMPAR_SEATS#define LIMPAR_SEATS 107 |
---|
License max-seats |
◆ LIMPAR_SERIAL#define LIMPAR_SERIAL 114 |
---|
License serial string |
◆ LIMPAR_SIZE#define LIMPAR_SIZE 105 |
---|
License Size identifier |
◆ LIMPAR_TYPE#define LIMPAR_TYPE 106 |
---|
License Type identifier |
◆ LIMPAR_USERINFO#define LIMPAR_USERINFO 115 |
---|
License user identifier |
Sample symbolic constants to set up a license
This is a list of symbolic constants provided in includeliman.h
for grouping the input required to set up a license into sensible sets. The symbols and their values can be modified as the user sees fit or they could be ignored altogether because LIMAN SDK does not use them internally. These constants are intended to be used mainly with lim_load_lic() or when checking license properties (lim_platform_id(), lim_product_id(), etc..) More…
Modules
Version constants
Version tags can be integer values in 0-255 range. |
Platform constants
Platform identifiers can be integer values in 0-255 range. |
License-size constants
Size constant can be integer values in 0-255 range. |
License-type constants
License type can be integer values in 0-255 range. |
Feature bitmasks
Each feature slot can take integer values in 0-255 range enabling/disabling a subset of 8 features. |
Detailed Description
List of license properties.
This is a list of symbolic constants provided in includeliman.h
for grouping the input required to set up a license into sensible sets. The symbols and their values can be modified as the user sees fit or they could be ignored altogether because LIMAN SDK does not use them internally. These constants are intended to be used mainly with lim_load_lic() or when checking license properties (lim_platform_id(), lim_product_id(), etc..)
Version constants
Symbolic ConstantsSymbolic Constants » | Sample symbolic constants to set up a license
Version tags can be integer values in 0-255 range. More…
Macros
#define | LIMPROD_MAJOR_VER 1 |
#define | LIMPROD_MINOR_VER 0 |
Detailed Description
Version tags can be integer values in 0-255 range.
Macro Definition Documentation
◆ LIMPROD_MAJOR_VER#define LIMPROD_MAJOR_VER 1 |
---|
Placeholder reserved for optional product version |
◆ LIMPROD_MINOR_VER#define LIMPROD_MINOR_VER 0 |
---|
Placeholder reserved for optional product version |
Platform constants
Symbolic Constants » Sample symbolic constants to set up a license
Platform identifiers can be integer values in 0-255 range. More…
Macros
#define | LIMPLAT_WIN32X86 1 |
#define | LIMPLAT_LNX32X86 2 |
#define | LIMPLAT_OSX32X86 3 |
#define | LIMPLAT_SOL32X86 4 |
#define | LIMPLAT_SSPARK32 5 |
#define | LIMPLAT_WIN64X86 6 |
#define | LIMPLAT_LNX64X86 7 |
#define | LIMPLAT_OSX64X86 8 |
#define | LIMPLAT_SOL64X86 9 |
#define | LIMPLAT_SSPARK64 10 |
#define | LIMPLAT_MINGW32 11 |
#define | LIMPLAT_MINGW64 12 |
Detailed Description
Platform identifiers can be integer values in 0-255 range.
Macro Definition Documentation
◆ LIMPLAT_LNX32X86#define LIMPLAT_LNX32X86 2 |
---|
Identifies 32-bit Linux operating system on x86 architecture |
◆ LIMPLAT_LNX64X86#define LIMPLAT_LNX64X86 7 |
---|
Identifies 64-bit Linux operating system on x86_64 architecture |
◆ LIMPLAT_MINGW32#define LIMPLAT_MINGW32 11 |
---|
Identifies 32-bit MinGW toolchain for x86 architecture |
◆ LIMPLAT_MINGW64#define LIMPLAT_MINGW64 12 |
---|
Identifies 64-bit MinGW toolchain for x64 architecture |
◆ LIMPLAT_OSX32X86#define LIMPLAT_OSX32X86 3 |
---|
Identifies 32-bit OSX operating system on x86 architecture |
◆ LIMPLAT_OSX64X86#define LIMPLAT_OSX64X86 8 |
---|
Identifies 64-bit OSX operating system on x86_64 architecture |
◆ LIMPLAT_SOL32X86#define LIMPLAT_SOL32X86 4 |
---|
Identifies 32-bit Solaris operating system on x86 architecture |
◆ LIMPLAT_SOL64X86#define LIMPLAT_SOL64X86 9 |
---|
Identifies 64-bit Solaris operating system on x86_64 architecture |
◆ LIMPLAT_SSPARK32#define LIMPLAT_SSPARK32 5 |
---|
Identifies 32-bit Solaris operating system on sparc architecture |
◆ LIMPLAT_SSPARK64#define LIMPLAT_SSPARK64 10 |
---|
Identifies 64-bit Solaris operating system on sparc architecture |
◆ LIMPLAT_WIN64X86#define LIMPLAT_WIN64X86 6 |
---|
Identifies 64-bit Window operating system on x86_64 architecture |
License-size constants
Symbolic Constants » Sample symbolic constants to set up a license
Size constant can be integer values in 0-255 range. More…
Macros
#define | LIMSIZE_DEMO 101 |
#define | LIMSIZE_STANDARD 102 |
#define | LIMSIZE_EXTENDED 103 |
Detailed Description
Size constant can be integer values in 0-255 range.
Macro Definition Documentation
◆ LIMSIZE_DEMO#define LIMSIZE_DEMO 101 |
---|
Identifies a demo/trial license
Example: |
◆ LIMSIZE_EXTENDED#define LIMSIZE_EXTENDED 103 |
---|
Identifies a extended license
|
◆ LIMSIZE_STANDARD#define LIMSIZE_STANDARD 102 |
---|
Identifies a standard license
Example: |
License-type constants
Symbolic Constants » Sample symbolic constants to set up a license
License type can be integer values in 0-255 range. More…
Macros
#define | LIMTYPE_EDUCATIONAL 111 |
#define | LIMTYPE_COMMERCIAL 112 |
#define | LIMTYPE_DEVELOPMENT 113 |
Detailed Description
License type can be integer values in 0-255 range.
Macro Definition Documentation
◆ LIMTYPE_COMMERCIAL#define LIMTYPE_COMMERCIAL 112 |
---|
Identifies an commercial license
|
◆ LIMTYPE_DEVELOPMENT#define LIMTYPE_DEVELOPMENT 113 |
---|
Identifies an development license
Example: |
◆ LIMTYPE_EDUCATIONAL#define LIMTYPE_EDUCATIONAL 111 |
---|
Identifies an educational license
Example: |
Feature bitmasks
Symbolic Constants » Sample symbolic constants to set up a license
Each feature slot can take integer values in 0-255 range enabling/disabling a subset of 8 features. More…
Macros
#define | LIMOPT_FEATURE_0 1 |
#define | LIMOPT_FEATURE_1 2 |
#define | LIMOPT_FEATURE_2 4 |
#define | LIMOPT_FEATURE_3 8 |
#define | LIMOPT_FEATURE_4 16 |
#define | LIMOPT_FEATURE_5 32 |
#define | LIMOPT_FEATURE_6 64 |
#define | LIMOPT_FEATURE_7 128 |
Detailed Description
Each feature slot can take integer values in 0-255 range enabling/disabling a subset of 8 features.
Macro Definition Documentation
◆ LIMOPT_FEATURE_3#define LIMOPT_FEATURE_3 8 |
---|
Bitmask value associated with feature 3 (4’th bit)
Example: |
◆ LIMOPT_FEATURE_4#define LIMOPT_FEATURE_4 16 |
---|
Bitmask value associated with feature 4 (5’th bit)
Example: |
Examples
ahostid.c
This is a utility application to compute the hostid of current host based on specified hardware identifiers.
limgen.c
This is a utility application to generate and verify license keys with specified options and features.
limutil.c
This is a utility application to perform various tasks with LIMAN SDK:
- Generate keypairs
- Determine hardware and users features (macid,userid,cpuid,etc..)
- Calculate hash of input data (files or strings)
- Hide small data in BMP (bitmap) files.
- UUID generation
testapp.c
This is a test application illustrating how to integrate LIMAN SDK to your software to protect it with license keys you generate with ‘limgen’ or a derivative of it.It is also illustrated how license-features can be used to let you impose license-based restrictions on certain capabilities of your software.
testapp.java
This is a test application illustrating how to integrate LIMAN SDK to your software to protect it with license keys you generate with ‘limgen’ or a derivative of it.It is also illustrated how license-features can be used to let you impose license-based restrictions on certain capabilities of your software.