LexActivator class

Constructors

LexActivator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

ActivateLicense() int
Activates the license by contacting the Cryptlex servers.
ActivateLicenseOffline({required String filePath}) int
Activates your application using the offline activation response file. Requires filePath to the response file.
ActivateLocalTrial({required int trialLength}) int
Starts the local(unverified) trial for trialLength days.
ActivateTrial() int
Starts the verified trial in your application by contacting the Cryptlex servers. Returns LexStatusCodes LA_OK, LA_TRIAL_EXPIRED
ActivateTrialOffline({required String filePath}) int
Activates the trial using the offline activation response file at filePath
convertArrayToDartString(Pointer<NativeType> charPtr) String
Converts Pointer to Array to a String usable in Dart
DeactivateLicense() int
Deactivates the license activation and frees up the correponding activation slot by contacting the Cryptlex servers. This function should be executed at the time of deregistration, ideally on a button click.
DecrementActivationMeterAttributeUses({required String name, required int decrement}) int
Decrements the meter attribute uses of the activation named name by decrement.
ExtendLocalTrial({required int trialExtensionLength}) int
Extends the local trial by trialExtensionLength days.
GenerateOfflineActivationRequest({required String filePath}) int
Generates the offline activation request needed for generating offline activation response in the dashboard. Requires filePath of where the file is to be created.
GenerateOfflineDeactivationRequest({required String filePath}) int
Generates the offline deactivation request file needed for deactivation of the license in the dashboard at filePath and deactivates the license locally.
GenerateOfflineTrialActivationRequest({required String filePath}) int
Generates the offline trial activation request at filePath needed for generating offline trial activation response in the dashboard.
GetActivationMetadata(String key) String
Returns the activation metadata associated with the key.
GetActivationMeterAttributeUses({required String name}) int
Returns the meter attribute uses consumed by the activation associated with the meter attribute name.
GetLibraryVersion() String
Returns the version of this library.
GetLicenseAllowedActivations() int
Returns the allowed activations of the license.
GetLicenseExpiryDate() int
Returns the license expiry date timestamp.
GetLicenseKey() String
Returns the license key used for activation.
GetLicenseMetadata({required String key}) String
Returns the license metadata for the passed key value, as set in the dashboard.
GetLicenseMeterAttribute({required String name}) LicenseMeterAttribute
Returns a LicenseMeterAttribute class object containing allowedUses, totalUses, and grossUses, using the name of the meter attribute.
GetLicenseTotalActivations() int
Returns the total activations of the license.
GetLicenseType() String
Returns the license type (node-locked or hosted-floating).
GetLicenseUserCompany() String
Returns the company associated with the license user.
GetLicenseUserEmail() String
Returns the email associated with the license user.
GetLicenseUserMetadata({required String key}) String
Returns the metadata associated with the license user associated with the key.
GetLicenseUserName() String
Returns the name associated with the license user.
GetLocalTrialExpiryDate() int
Returns the local trial expiry date timestamp.
GetProductMetadata({required String key}) String
Returns the product metadata for the passed key value, as set in the dashboard.
GetServerSyncGracePeriodExpiryDate() int
Returns the server sync grace period expiry date timestamp.
GetTrialActivationMetadata({required String key}) String
Returns the trial activation metadata associated with the key;
GetTrialExpiryDate() int
Returns the trial expiry date timestamp.
GetTrialId() String
Returns the trial activation ID to be used in case of trial extensions.
IncrementActivationMeterAttributeUses({required String name, required int increment}) int
Increments the meter attribute uses of the activation named name by increment.
IsLicenseGenuine() int
It verifies whether your app is genuinely activated or not. Returns LexStatusCodes LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_GRACE_PERIOD_OVER, and LA_FAIL.
IsLicenseValid() int
It verifies whether your app is genuinely activated or not. Returns LexStatusCodes LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_GRACE_PERIOD_OVER, and LA_FAIL
IsLocalTrialGenuine() int
It verifies whether trial has started and is genuine or not. The verification is done locally.
IsTrialGenuine() int
It verifies whether trial has started and is genuine or not.
loadLib() DynamicLibrary
Function used to internally load dynamic libraries. For developer use only.
Reset() int
Resets the activation and trial data stored in the machine. This function is meant for developer testing only. Note: The function does not reset local(unverified) trial data.
ResetActivationMeterAttributeUses({required String name}) int
Resets the meter attribute uses of the activation named name.
SetActivationMetadata({required String key, required String value}) int
Sets the activation metadata with a key, value pair.
SetAppVersion({required String appVersion}) int
Sets the current appVersion of your application.
SetCryptlexHost(String host) int
Sets the host for your on-premise server, in case you are running Cryptlex on-premise.
SetCustomDeviceFingerprint({required String fingerprint}) int
This function can be used to set a custom device fingerprint to fingerprint which is a string of minimum length 64 characters and maximum length 256 characters, in case you don't want to use the LexActivator's advanced device fingerprinting algorithm.
SetDataDirectory({required String directoryPath}) int
In case you want to change the default directory used by LexActivator to store the activation data on Linux and macOS, this function can be used to set it to directoryPath which is the absolute path of the directory.
SetLicenseKey({required String licenseKey}) int
Sets the licenseKey required to activate the license.
SetLicenseUserCredential({required String email, required String password}) int
Sets the license email and password for authentication.
SetNetworkProxy({required String proxy}) int
Sets the network proxy to be used when contacting Cryptlex servers.
SetOfflineActivationRequestMeterAttributeUses({required String name, required int uses}) int
Sets the meter attribute uses for the offline activation request to the given name.
SetProductData({required String productData}) int
Embeds the Product.dat file in the application where productData is the content of the Product.dat file.
SetProductFile({required String filePath}) int
Sets the absolute path of the Product.dat file where filePath is the absolute path of the product file (Product.dat).
SetProductId({required String productId, required int flags}) int
Sets the product id of your application to productId which is mentioned on the product page in the Cryptlex dashboard.
SetTrialActivationMetadata({required String key, required String value}) int
Sets the trial activation metadata with a key, value pair.

Constants

LA_IN_MEMORY → const int
TODO
LA_SYSTEM → const int
TODO
LA_USER → const int
TODO