### Install LexFloatClient Go Library Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-go Installs the LexFloatClient wrapper for Go using the go get command. Includes a note for Windows users regarding DLL copying. ```bash go get -u github.com/cryptlex/lexfloatclient-go ``` ```bash xcopy %USERPROFILE%\go\src\github.com\cryptlex\lexfloatclient-go\libs\windows_amd64\LexFloatClient.dll ``` -------------------------------- ### Install LexActivator Go Wrapper Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-go Installs the LexActivator wrapper for Go applications using the go get command. This is the primary method for adding the library to your project. ```bash go get -u github.com/cryptlex/lexactivator-go ``` -------------------------------- ### LexFloatServer Installation on Windows Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Instructions for installing LexFloatServer as a Windows service. It covers the command-line arguments for installation, including specifying service and display names. ```bash lexfloatserver -i --service-name myfloatingserver --service-display-name MyFloatingServer ``` -------------------------------- ### Install NGINX Ingress Controller Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Installs the NGINX Ingress Controller on Kubernetes using Helm. This controller exposes services externally via a Load Balancer. It requires a configuration file (`ingress.yaml`) to define its behavior. ```yaml controller: publishService: enabled: true service: enabled: true externalTrafficPolicy: "Local" ``` ```bash helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --values ingress.yaml kubectl get services -o wide -w ingress-nginx-controller ``` -------------------------------- ### Install LexFloatClient via npm Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-node.js Installs the LexFloatClient wrapper for Node.js using npm. Ensure you have Node.js and npm installed. This command fetches and installs the necessary package. ```bash npm i @cryptlex/lexfloatclient ``` -------------------------------- ### Start LexFloatServer Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Starts the LexFloatServer in the terminal for testing purposes. Requires admin rights to run. ```bash lexfloatserver -s ``` -------------------------------- ### Install LexFloatClient with Pip Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-python Installs the LexFloatClient Python wrapper using pip. Ensure Python and pip are installed on your system. This command fetches and installs the library from the Python Package Index. ```bash pip install cryptlex.lexfloatclient ``` -------------------------------- ### Download and Customize Helm Values File Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Download the default Cryptlex Enterprise Helm chart values file and create environment-specific copies for customization. This allows tailoring configurations for staging and production environments, including database connection details, file store settings, and domain names. ```bash curl -O https://raw.githubusercontent.com/cryptlex/helm-charts/master/cryptlex/cryptlex-enterprise/values.yaml cp values.yaml staging.yaml cp values.yaml production.yaml ``` -------------------------------- ### Install Cert-Manager for TLS Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Installs Cert-Manager on Kubernetes using Helm to automate the issuance and renewal of Let's Encrypt TLS certificates. This enables HTTPS for your Ingress resources. ```bash helm repo add jetstack https://charts.jetstack.io --force-update helm upgrade --install cert-manager jetstack/cert-manager \ --create-namespace --namespace cert-manager --atomic \ --set crds.enabled=true ``` -------------------------------- ### Deploy Cryptlex Enterprise to Production Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Deploys the Cryptlex Enterprise Helm chart to a Kubernetes cluster for the production environment. It creates a dedicated namespace 'cryptlex' and uses the 'production.yaml' values file for configuration. The command upgrades or installs the 'cryptlex-enterprise' release. ```bash kubectl create namespace cryptlex helm upgrade --install cryptlex-enterprise \ --values production.yaml \ --namespace cryptlex cryptlex/cryptlex-enterprise ``` -------------------------------- ### Configure Product Data and ID (C# Example) Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-python Demonstrates setting product data from a file's content or path, and setting the product ID. This example uses C# syntax but illustrates the LexActivator API concepts. ```csharp LexActivator.SetProductData("PASTE_CONTENT_OF_PRODUCT.DAT_FILE"); LexActivator.SetProductId("PASTE_PRODUCT_ID", PermissionFlags.LA_USER); ``` -------------------------------- ### LexFloatServer Management on Linux Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Commands to stop and start the LexFloatServer Linux service using the 'service' command. Requires the service name configured during installation. ```bash sudo service myfloatingserver stop sudo service myfloatingserver start ``` -------------------------------- ### Run Docker Compose Commands Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/docker Provides the necessary Bash commands to log into Docker, start the Cryptlex services in detached mode, and monitor logs for errors. These commands initiate the server deployment. ```bash # ensure you have access to Cryptlex Docker images docker login -u $DOCKER_USERNAME # start the Cryptlex services docker compose up -d # execute the following command to check the logs for any error docker compose logs -t -f ``` -------------------------------- ### LexFloatServer Management on macOS Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Commands to stop and start the LexFloatServer macOS launchd daemon using the 'launchctl' command. Requires the service name configured during installation. ```bash sudo launchctl stop com.mycompany.myfloatingserver sudo launchctl start com.mycompany.myfloatingserver ``` -------------------------------- ### LexFloatServer Installation on Linux Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Instructions for installing LexFloatServer as a Linux service (Systemd, Upstart, or SysV). It uses the '-i' flag with a service name. ```bash lexfloatserver -i --service-name myfloatingserver ``` -------------------------------- ### LexFloatServer Management on Windows Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Commands to stop and start the LexFloatServer Windows service using the 'sc' utility. Requires the service name specified during installation. ```bash sc stop myfloatingserver sc start myfloatingserver ``` -------------------------------- ### Activate License with LexActivator in C Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-c-c++-and-objective-c Provides a comprehensive C code example for activating a software license using LexActivator. It includes setting product data, product ID, license key, and optional activation metadata. The example also demonstrates checking the activation status and handling potential errors. ```c int status; status = SetProductData("PASTE_CONTENT_OF_PRODUCT.DAT_FILE"); if (LA_OK != status) { // handle error } status = SetProductId("PASTE_PRODUCT_ID", LA_USER); if (LA_OK != status) { // handle error } status = SetLicenseKey("PASTE_LICENCE_KEY"); if (LA_OK != status) { // handle error } status = SetActivationMetadata("key1", "value1"); if (LA_OK != status) { // handle error } status = ActivateLicense(); if (LA_OK == status || LA_EXPIRED == status || LA_SUSPENDED == status) { printf("License activated successfully: %d", status); } else { printf("License activation failed: %d", status); } ``` -------------------------------- ### Deploy Cryptlex Enterprise to Staging Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Deploys the Cryptlex Enterprise Helm chart to a Kubernetes cluster for the staging environment. It creates a dedicated namespace 'cryptlex-stg' and uses the 'staging.yaml' values file for configuration. The command upgrades or installs the 'cryptlex-enterprise-stg' release. ```bash kubectl create namespace cryptlex-stg helm upgrade --install cryptlex-enterprise-stg \ --values staging.yaml \ --namespace cryptlex-stg cryptlex/cryptlex-enterprise ``` -------------------------------- ### LexFloatServer Installation on macOS Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Instructions for installing LexFloatServer as a macOS launchd daemon. It uses the '-i' flag along with a service name. ```bash lexfloatserver -i --service-name com.mycompany.myfloatingserver ``` -------------------------------- ### Install LexFloatClient via NuGet Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-vb.net This command installs the LexFloatClient wrapper for VB.NET using the NuGet package manager. Ensure you have NuGet configured in your project. ```bash Install-Package Cryptlex.LexFloatClient ``` -------------------------------- ### Install Cryptlex LexFloatClient via NuGet Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-c Commands to add the Cryptlex.LexFloatClient library to a .NET project using the NuGet package manager. This is the first step to integrate licensing into your application. ```bash Install-Package Cryptlex.LexFloatClient # or dotnet add package Cryptlex.LexFloatClient ``` -------------------------------- ### On-premise-floating License Configuration Source: https://docs.cryptlex.com/license-management/implementing-license-models Enables a floating licensing model for environments that may not be internet-connected. Requires customers to install LexFloatServer, with the number of leased licenses determined by `allowedFloatingClients`. ```APIDOC On-premise-floating License Configuration: Properties: type: on-premise-floating leaseDuration: 0, >0 allowedFloatingClients: >0 ``` -------------------------------- ### Command Line Parameters and Usage Source: https://docs.cryptlex.com/changelog/lexfloatserver Key command-line options and usage instructions for the lexfloatserver. ```CLI Command Line Usage: - lexfloatserver --help - Description: Displays help information and lists all available command-line options. - Context: Command-line options are now POSIX-compliant. - -cryptlexhost - Description: Allows setting a custom host for Cryptlex communication. - Example: lexfloatserver -cryptlexhost api.custom.com - Related: Bypass system proxy settings by adding 'api.cryptlex.com' to the bypass list. ``` -------------------------------- ### Sample License Creation Response Source: https://docs.cryptlex.com/license-management/creating-licenses This is a sample JSON response received after successfully creating a license. It includes details such as the generated license key, activation counts, validity period, expiration date, and associated product and user IDs. ```javascript { "key": "0A2035-E8A2A3-4D31B7-8FF9C6-81A6CA-539E54", "revoked": false, "suspended": false, "totalActivations": 0, "totalDeactivations": 0, "validity": 2595000, "expirationStrategy": "immediate", "fingerprintMatchingStrategy": "fuzzy", "allowedActivations": 1, "allowedDeactivations": 10, "type": "node-locked", "allowedFloatingClients": 0, "serverSyncGracePeriod": 2595000, "serverSyncInterval": 3600, "leaseDuration": 0, "expiresAt": "2018-06-06T08:49:17.9361143Z", "allowVmActivation": true, "userLocked": false, "productId": "63dfd63e-ed71-4f84-9236-02ee0ddb062c", "user": null, "allowedCountries": [], "disallowedCountries": [], "allowedIpAddresses": [], "disallowedIpAddresses": [], "metadata": [], "tags": [], "id": "23d9646c-34f5-4d37-adeb-f7f77b927bdb", "createdAt": "2018-05-06T08:49:17.9361143Z", "updatedAt": "2018-05-06T08:49:17.9361158Z" } ``` -------------------------------- ### Cryptlex Subscription Configuration Source: https://docs.cryptlex.com/license-management/license-subscriptions Defines how to configure subscription-based licenses in Cryptlex using ISO8601 durations for intervals and specific triggers for the start of the subscription period. ```APIDOC Subscription Interval: Format: ISO8601 durations (e.g., P1Y, P3M10D, P30D) Description: Specifies the duration for recurring subscription cycles. Subscription Start Trigger: Options: - License Creation: Subscription starts upon license creation. - License Activation: Subscription starts upon the first license activation. Description: Determines when the subscription period begins. ``` -------------------------------- ### Update Helm Repositories and Upgrade Deployments Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes This set of commands updates all local Helm chart repositories and then upgrades existing deployments for NGINX Ingress and Cryptlex Enterprise in both staging and production environments. It ensures that the cluster has the latest chart versions and applies updated configurations. ```bash # Update all Helm repos helm repo update # Upgrade NGINX Ingress helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --values ingress.yaml # Upgrade staging environment helm upgrade --install cryptlex-enterprise-stg \ --values staging.yaml \ --namespace cryptlex-stg cryptlex/cryptlex-enterprise # Upgrade production environment helm upgrade --install cryptlex-enterprise \ --values production.yaml \ --namespace cryptlex cryptlex/cryptlex-enterprise ``` -------------------------------- ### LexFloatClient API for Floating Licenses Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-c Comprehensive documentation for Cryptlex LexFloatClient methods used to manage floating licenses. This includes setting up the product ID, configuring the server, requesting, renewing, and dropping licenses, along with error handling. ```APIDOC LexFloatClient: SetHostProductId(productId: string) - Sets the unique identifier for your product. - This ID must match the product ID configured in the Cryptlex admin portal. - Example: LexFloatClient.SetHostProductId("PASTE_PRODUCT_ID"); SetHostUrl(hostUrl: string) - Sets the address of the LexFloatServer. - This is required for the client to communicate with the license server. - Example: LexFloatClient.SetHostUrl("http://localhost:8090"); SetFloatingLicenseCallback(callback: Action) - Registers a callback function to receive notifications about license status changes (e.g., renewal success or failure). - The callback receives a status code indicating the outcome. - Example: LexFloatClient.SetFloatingLicenseCallback(LicenceRenewCallback); RequestFloatingLicense() - Initiates the process to obtain a floating license from the LexFloatServer. - This method contacts the server and attempts to lease a license. - Must be called after SetHostProductId, SetHostUrl, and SetFloatingLicenseCallback. - Example: LexFloatClient.RequestFloatingLicense(); HasFloatingLicense(): bool - Checks if the application currently holds a valid floating license. - Returns true if a license is active, false otherwise. - Example: if (!LexFloatClient.HasFloatingLicense()) { return; } DropFloatingLicense() - Releases the currently held floating license back to the server. - It's crucial to call this when the application closes to avoid 'zombie' licenses. - Example: LexFloatClient.DropFloatingLicense(); LexFloatClientException: - Custom exception class for LexFloatClient operations. - Properties: - Code: uint - An error code indicating the specific failure. - Message: string - A descriptive error message. LexFloatStatusCodes: - Enum or constants representing possible license operation status codes. - LF_OK (0): Operation successful. - LF_E_LICENSE_NOT_FOUND (e.g., 0x80004005): License expired before renewal. - LF_E_LICENSE_EXPIRED_INET (e.g., 0x80070005): License expired due to network issues. - Other codes indicate various failure reasons. ``` -------------------------------- ### Add Cryptlex Helm Repository Source: https://docs.cryptlex.com/cryptlex-on-premise/installation-guide/kubernetes Adds the official Cryptlex Helm chart repository to your local Helm configuration. This command ensures that Helm can fetch the latest versions of the Cryptlex Enterprise chart. The --force-update flag ensures the repository is updated even if it already exists. ```bash helm repo add cryptlex https://cryptlex.github.io/helm-charts --force-update ``` -------------------------------- ### Activate LexFloatServer (CLI) Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Covers command-line options for activating the LexFloatServer license key. Supports both online and offline activation methods. ```bash # Online activation lexfloatserver -a --license-key LICENSE_KEY # Offline activation request generation lexfloatserver -g --license-key LICENSE_KEY --offline-request FILEPATH # Offline activation using response file lexfloatserver -a --license-key=LICENSE_KEY --offline-response=FILEPATH ``` -------------------------------- ### Request Floating License Lease in Java Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-java This example demonstrates how to request a floating license lease from a LexFloatServer. It involves setting the server URL, product ID, registering a callback listener for status notifications, and initiating the license request. ```Java try { CallbackEventListener eventListener = new CallbackEventListener(); LexFloatClient.SetHostProductId("PASTE_PRODUCT_ID"); LexFloatClient.SetHostUrl("http://localhost:8090"); LexFloatClient.AddLicenseCallbackListener(eventListener); LexFloatClient.RequestFloatingLicense(); System.out.println("Success! License acquired."); } catch (LexFloatClientException ex) { System.out.println(ex.getCode() + ": " + ex.getMessage()); } catch (IOException ex) { System.out.println(ex.getMessage()); } ``` -------------------------------- ### Install LexActivator Python Library Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-python Installs the LexActivator wrapper for Python using pip. Ensure you have Python and pip installed. ```bash pip install cryptlex.lexactivator ``` -------------------------------- ### Request Floating License in Python Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-python Demonstrates the process of requesting a floating license. It involves setting the product ID, the server URL, a callback function for status updates, and then initiating the license request. Error handling for potential exceptions is included. ```python def main(): try: LexFloatClient.SetHostProductId("PASTE_PRODUCT_ID") LexFloatClient.SetHostUrl("http://localhost:8090") LexFloatClient.SetFloatingLicenseCallback(licence_callback_fn) LexFloatClient.RequestFloatingLicense() print("Success! License acquired.) except LexFloatClientException as exception: print('Error code:', exception.code, exception.message) ``` -------------------------------- ### Install LexActivator Node.js Package Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-node.js Installs the LexActivator Node.js wrapper using npm. Ensure you have Node.js and npm installed. LexActivator has a dependency on the VS2015 runtime on Windows. ```bash npm i @cryptlex/lexactivator ``` -------------------------------- ### LexFloatClient API Documentation Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-python Provides essential LexFloatClient API methods for managing floating licenses. This includes setting product identifiers, host URLs, license callbacks, requesting licenses, and dropping them. These methods are crucial for integrating license management into your Python application. ```APIDOC LexFloatClient: SetHostProductId(product_id: str) Sets the unique product identifier for the application. Parameters: product_id: The product ID obtained from the admin portal. SetHostUrl(url: str) Configures the address of the LexFloatServer. Parameters: url: The URL of the LexFloatServer (e.g., "http://localhost:8090"). SetFloatingLicenseCallback(callback_function: callable) Registers a callback function to receive status notifications for license events. Parameters: callback_function: A Python function that accepts a status code. RequestFloatingLicense() Initiates a request to the LexFloatServer to acquire a floating license. This method should be called after setting the product ID, host URL, and callback. DropFloatingLicense() Releases the acquired floating license back to the LexFloatServer. This should be called when the application is closing or the license is no longer needed to prevent zombie licenses. ``` -------------------------------- ### Verify License Activation with LexActivator (Go) Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-go This Go code snippet demonstrates how to verify license activation using the LexActivator API. It sets up product data, product ID, and release version, then calls `IsLicenseGenuine()` to check the license status. The function handles various license states including OK, expired, suspended, and grace period over. This verification should be performed on application startup. ```go package main import ( "fmt" "os" "path/to/lexactivator" ) func main() { var status C.int status = lexactivator.SetProductData("PASTE_CONTENT_OF_PRODUCT.DAT_FILE") if lexactivator.LA_OK != status { fmt.Println("Error Code:", status) os.Exit(1) } status = lexactivator.SetProductId("PASTE_PRODUCT_ID", lexactivator.LA_USER) if lexactivator.LA_OK != status { fmt.Println("Error Code:", status) os.Exit(1) } status = lexactivator.SetReleaseVersion("PASTE_YOUR_RELEASE_VERSION") if lexactivator.LA_OK != status { fmt.Println("Error Code:", status) os.Exit(1) } status = lexactivator.IsLicenseGenuine() if lexactivator.LA_OK == status { fmt.Println("License is genuinely activated!") } else if lexactivator.LA_EXPIRED == status { fmt.Println("License is genuinely activated but has expired!") } else if lexactivator.LA_SUSPENDED == status { fmt.Println("License is genuinely activated but has been suspended!") } else if lexactivator.LA_GRACE_PERIOD_OVER == status { fmt.Println("License is genuinely activated but grace period is over!") } else { fmt.Println("License is not activated:", status) } } ``` -------------------------------- ### Set Product ID for LexFloatClient Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-c Initializes the LexFloatClient by setting the product identifier. This is a mandatory first step before performing any licensing operations. ```csharp LexFloatClient.SetHostProductId("PASTE_PRODUCT_ID"); ``` -------------------------------- ### Install LexActivator NuGet Package Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-csharp Installs the LexActivator wrapper for C# via NuGet package manager. Supports both Package Manager Console and .NET CLI. ```bash Install-Package Cryptlex.LexActivator # or dotnet add package Cryptlex.LexActivator ``` -------------------------------- ### Install LexActivator VB.NET NuGet Package Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-vb.net Installs the LexActivator wrapper for VB.NET applications using the NuGet package manager. This is the primary method for adding the library to your project. ```bash Install-Package Cryptlex.LexActivator ``` -------------------------------- ### Add LexActivator Package Source: https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-flutter Installs the LexActivator Dart wrapper for Flutter applications using the Flutter package manager. ```shell flutter pub add lexactivator ``` -------------------------------- ### Request Floating License Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/using-lexfloatclient/using-lexfloatclient-with-ios Initiates the process of obtaining a floating license. This involves setting the server URL, registering a callback for status updates, and then making the request to the LexFloatServer. ```c int status; status = SetHostProductId(L"PASTE_PRODUCT_ID"); if(LF_OK != status) { // handle error } status = SetHostUrl("http://localhost:8090"); if(LF_OK != status) { // handle error } status = SetFloatingLicenseCallback(LicenceRenewCallback); if(LF_OK != status) { // handle error } status = RequestFloatingLicense(); if(LF_OK != status) { // handle error } printf("License leased successfully!"); ``` -------------------------------- ### GET License Info API Source: https://docs.cryptlex.com/floating-licenses/on-premise-floating-licenses/lexfloatserver Fetches detailed information about the license used to activate the LexFloatServer. This includes activation dates, expiry, and user details. ```APIDOC GET http://localhost:8090/api/server/license-info Description: Gets the license info of the license used to activate the LexFloatServer. Response (200 OK): { "key": "280D2B-B48A03-406BBC-2EEE4A-C20FB3-749630", "allowedFloatingClients": 10, "createdAt": 1680518500, "activatedAt": 1680518506, "expiresAt": 1681814506, "serverSyncGracePeriodExpiresAt": 1680775357, "activationMode": { "initial": "online", "current": "online" }, "user": { "name": "John Doe", "email": "johndoe@example.com", "company": "My Example Company" }, "organization": null } ```