Welcome to cryptolens python’s documentation!

class licensing.methods.Key[source]

License key related methods. More docs: https://app.cryptolens.io/docs/api/v3/Key.

activate(rsa_pub_key, product_id, key, machine_code, fields_to_return=0, metadata=False, floating_time_interval=0, max_overdraft=0)[source]

Calls the Activate method in Web API 3 and returns a tuple containing (LicenseKey, Message). If an error occurs, LicenseKey will be None. If everything went well, no message will be returned.

More docs: https://app.cryptolens.io/docs/api/v3/Activate

class licensing.models.LicenseKey(ProductId, ID, Key, Created, Expires, Period, F1, F2, F3, F4, F5, F6, F7, F8, Notes, Block, GlobalId, Customer, ActivatedMachines, TrialActivation, MaxNoOfMachines, AllowedMachines, DataObjects, SignDate, RawResponse)[source]
load_from_string(string, signature_expiration_interval=-1)[source]

Loads a license from a string generated by save_as_string. Note: if an error occurs, None will be returned. An error can occur if the license string has been tampered with or if the public key is incorrectly formatted.

Parameters:signature_expiration_interval – If the license key was signed,

this method will check so that no more than “signatureExpirationInterval” days have passed since the last activation.

save_as_string()[source]

Save the license as a string that can later be read by load_from_string.

class licensing.methods.Helpers[source]
GetMachineCode()[source]

Get a unique identifier for this device.

IsOnRightMachine(is_floating_license=False, allow_overdraft=False)[source]

Check if the device is registered with the license key.

class licensing.models.ActivatedMachine(IP, Mid, Time)[source]
class licensing.models.Response(license_key, signature, result, message)[source]

Indices and tables