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:
toml
[dependencies]
lexactivator = { version = "3.0.0"}
Simple example usage:
```rust
use lexactivator::*;
fn main() {
let productdata: String = String::from("PASTETHE CONTENTOFPRODUCT.DATFILE");
let productid: String = String::from("PRODUCTID");
let licensekey: String = String::from("LICENSEKEY");
let mut result: Result<(), LexActivatorError> = lexactivator::setproductdata(productdata);
match result {
Ok(()) => {
// Product data set successfully
println!("Product data set successfully.");
}
Err(error) => {
// Error occurred while setting product data
println!("Error while setting product data: {:?}", error);
}
}
result = lexactivator::setproductid(productid, PermissionFlags::LAUSER);
match result {
Ok(()) => {
// Product Id set successfully
println!("Product id set successfully.");
}
Err(error) => {
// Error occurred while setting product id
println!("Error while setting product id: {:?}", error);
}
}
result = lexactivator::setlicensekey(licensekey);
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 activationresult: Result
Err(error) => {
println!("License activation failed: {:?}", error);
}
}
}
This project is licensed under