Crates.io | lexactivator |
lib.rs | lexactivator |
version | 3.24.0 |
source | src |
created_at | 2023-07-11 06:26:18.384378 |
updated_at | 2024-09-19 12:06:12.1669 |
description | LexActivator SDK for Rust |
homepage | https://cryptlex.com |
repository | https://github.com/cryptlex/lexactivator-rust |
max_upload_size | |
id | 913531 |
size | 35,606,412 |
lexactivator is a rust wrapper for cryptlex's licensing SDK that lets you implement any type of licensing model such as node-locked, hosted floating licenses, trials and much more. This SDK offers support for online and offline activations.
In your Cargo.toml:
[dependencies]
lexactivator = { version = "3.22.2"}
Simple example usage:
use lexactivator::*;
fn main() {
let license_key: String = String::from("LICENSE_KEY");
let result = lexactivator::set_license_key(license_key);
match result {
Ok(()) => {
// License Key set successfully
println!("License key set successfully.");
}
Err(error) => {
// Error occurred while setting license key
println!("Error while setting license key: {:?}", error);
}
}
let activation_result: Result<LexActivatorStatus, LexActivatorError> = lexactivator::activate_license();
match activation_result {
Ok(LexActivatorStatus::LA_OK) => {
println!("License activated successfully");
}
Ok(_) => {
// Other success cases if needed
}
Err(error) => {
println!("License activation failed: {:?}", error);
}
}
}
This project is licensed under