CodeMeter Core API, an interface for all most common programming languages
CodeMeter Core API gives software developers the ability to access CodeMeter functions directly from within their software. These functions would generally concern the following three scenarios:
- Using and managing licenses
- Reading and writing data
- Using cryptographic functions
For CodeMeter Runtime, CodeMeter Core API is available as a dynamic library, as a .NET assembly, and as a Java interface. With these interfaces, almost all common programming languages can use CodeMeter Core API, including C/C++, C#, C++/CLI, Delphi, Java, Fortran, Fortran, VB, VB.NET, and Python.
CodeMeter Core API is also available as a static C-library as part of CodeMeter SDK and for CodeMeter Runtime and CodeMeter Embedded. For CodeMeter Embedded and CodeMeter µEmbedded, CodeMeter Core API is available as source code, again as part of the SDK. CodeMeter Core API has been published for all platforms that support CodeMeter, including Windows, macOS, Linux, Android, VxWorks, and QNX.
Function | CodeMeter µEmbedded | CodeMeter Embedded | CodeMeter Runtime |
---|---|---|---|
CmDongles | Yes | Yes | |
CmActLicenses | Yes | Yes | Yes |
CmCloudLicenses | Yes | ||
LAN Client | Yes | Yes | |
LAN Server | Yes | ||
Trial Licenses, Subscription-based Licenses | Yes | Yes | |
Pay-Per-Use Licenses | Yes | Yes | |
Feature-based Licenses | Yes | Yes | Yes |
Version-based Licenses | Yes | Yes | Yes |
License Transfer Master | Yes | ||
License Transfer Endpoint | Yes | Yes | Yes |
File-based License Update | Yes | Yes | Yes |
Terminal Server Detection | Yes | ||
Remote Desktop Detection | Yes | ||
Secure Key Storage | Yes | Yes | Yes |
Using and Managing Licenses
CodeMeter Core API offers software developers the opportunity to determine how licenses are used in their software. The licenses could be checked when the software is launched, and individual features could then be activated, deactivated, or hidden depending on the available license. The developers can also decide if licenses are allocated already during startup or at the first usage of the corresponding function. They can also determine if licenses are released at the termination of the software or at the end of the corresponding function. CodeMeter automatically checks whether the license is valid; expired licenses or licenses for other software versions would be rejected automatically. Whenever multiple valid licenses are available, CodeMeter would automatically choose the best fitting option.
Once a license is released, CodeMeter is notified that the license would again be available for other applications, which is important e.g. when using floating network (concurrent use) licenses. Should an application crash or otherwise terminate before the license release has been executed, CodeMeter would automatically take care of and release the resulting orphaned licenses.
For greater security, CodeMeter Core API allows data to be encrypted with a key that is stored in the license. The data could not be decrypted and used without the right license.
On top of enabling applications to use licenses effectively, CodeMeter also allows developers to manage licenses and create their own license managers. They could then access, read, or list expired or invalid licenses. Licenses can be activated or deactivated offline or online with CodeMeter License Central. Users can also simply borrow and return licenses as required.
Reading and Writing Data
CodeMeter includes the opportunity to store data in a license and to make this data available for use in an application. Software developers can write this data into the license during its original creation. Depending on the chosen data field, access to the data is free during runtime, or is limited by a special cryptographic operation (acting as a password). Developers also decides whether the data can be overwritten during runtime, which would be restricted to a specific programming sequence (acting as another password) and therefore again only be possible for the specific software application.
With CmSticks equipped with flash memory, CodeMeter Core API can also read and write data in a special hidden partition of the flash memory (Secure Disc). By contrast to the data contained in a license, which can range from several bytes to kilobytes, this offers space for several gigabytes of data. This option is used in particular for the secure storage of log files.
Function | CodeMeter µEmbedded | CodeMeter Embedded | CodeMeter Runtime |
---|---|---|---|
CmDongles | Yes | Yes | |
CmActLicenses | Yes | Yes | Yes |
CmCloudLicenses | Yes | ||
LAN Client | Yes | Yes | |
LAN Server | Yes | ||
Trial Licenses, Subscription-based Licenses | Yes | Yes | |
Pay-Per-Use Licenses | Yes | Yes | |
Feature-based Licenses | Yes | Yes | Yes |
Version-based Licenses | Yes | Yes | Yes |
License Transfer Master | Yes | ||
License Transfer Endpoint | Yes | Yes | Yes |
File-based License Update | Yes | Yes | Yes |
Terminal Server Detection | Yes | ||
Remote Desktop Detection | Yes | ||
Secure Key Storage | Yes | Yes | Yes |
Using Cryptographic Functions
CodeMeter allows the keys for cryptographic operations to be safely stored in a license, including private keys for encrypted OPC UA communication. These keys can ordinarily not be read, but are available for CodeMeter Core API. Keys can be created directly in a CmDongle to ensure that the keys never leave the safe CmDongle.
The following functions are available via CodeMeter Core API:
- Calculating hash values (SHA 256)
- Encrypting and decrypting data symmetrically (AES 128, AES 256)
- Encrypting and decrypting data asymmetrically (ECIES 224, RSA 1024, RSA 2048, RSA 4096)
- Signing data (ECDSA 224, RSA 1024, RSA 2048, RSA 4096)
- Calculating the public key for a stored private key (ECDSA 224, ECIES 224)
The functions can be used for a wide range of applications:
- Encrypted settings and data can be stored in the software to achieve a stronger level of protection.
- Data, created with the protected application, can be encrypted to restrict access to authorized users who possess a valid license.
- Data and log files can be signed to prove their authenticity and integrity.
- Keys can be used to initiate encrypted communication
Interested in a personalized offer for our CodeMeter technology? Just answer a few questions and our team will get back to you with all the information you need.
Submit