Cryptolens/cryptolens-python
Cryptolens Client API for Python
See #77 for more information.
load_from_file used `datetime.datetime.utcnow()` in the logic that checked if the license file was too old. This was replaces with ` datetime.datetime.now(dateime.timezone.utc)` to ensure it continues to work in future versions of Python.
This release solves #75 and #76. Thanks to @frilox042, @TimothyVermeirenBiztory
This update affects Windows users who are using GetMachineCode method. This update fixes the fallback code that uses the UUID obtained from the registry that is used to generate the machine code.
Please read more in https://help.cryptolens.io/examples/user-verification.
1. Added a new method to check if a license has expired locally. 2. Fixed GetMachineCode method so that it falls back on MachineGUID when WMIC does not work (Windows only). 3. Update setup.py that could solve issues installing the library in newer versions of Python and other platforms. #69 #71
The missing `name` parameter was added to Data.increment_int_value_to_key and Data.decrement_int_value_to_key methods. This would allow you locate a data object based on its name instead of using the Id (object_id in Python).
The fields added include "pageCount", "total" and "returned". These are accessible via the third list item of the result.
Adding methods to retrieve customer licenses. Please check out the following article on how to use the second method: https://help.cryptolens.io/web-interface/customer-secret
This update introduces two new methods, "AddFeature" and "RemoveFeature", that allow you to change the state of the 8 built in feature flags.
In this release, MachineLockLimit, ChangeNotes, ChangeReseller and CreateKeyFromTemplate were added to the Key class.
In this release, we added support for the metadata field that can be returned by Key.Activate. When `metadata=true` in the Key.Activate call, it will return an array of three elements instead of two, where the third element is the value of the additional metadata for a specific license.
This release adds a new error message to Key.activate that will be thrown if the period exceeds the permitted limit in Python. The problem is described in https://github.com/Cryptolens/cryptolens-python/tree/master#the-expiration-date-cannot-be-converted-to-a-datetime-object-please-try-setting-the-period-to-a-lower-value, but in essence, the issue is that the timestamp representation of the expiration date causes an overflow in Python, and thus an error is thrown.
In this update we fixed an issue that could occur if a license did not have the data object required for [feature templates](https://help.cryptolens.io/web-interface/feature-templates) or if the content of it was empty.
In this release, we have added support for proxy servers defined on OS level. To enable it, you can add the following command before calling any other API method such as Key.activate. ```python HelperMethods.proxy_experimental = True ```
This updates changes the behaviour of Helpers.GetMachineCode when the library is unable to retrieve the UUID. If this occurs, None will be returned.
When the machine code, we rely on the UUID that is provided by the OS. On Windows, we used to use wmic to obtain the UUID. As pointed out by @pmnforce in #50, it will be deprecated in Windows 11. We are thus switching to a different method to compute it, i.e., as follows: ``` cmd /c powershell.exe -Command "(Get-CimInstance -Class Win32_ComputerSystemProduct).UUID" ``` Based on our tests, this will not affect the value of the machine code, i.e., this update is backwards compatible.
The base address of the API was changed from app.cryptolens.io to api.cryptolens.io. Note: for corporate clients or those with strict firewall rules, please notify them to whitelist the IPs on the following page: https://help.cryptolens.io/security/api-ip[](https://github.com/)
📋 Changes
- get_events
- register_event
- add_data_object_to_key
- remove_data_object_to_key
- add_data_object_to_machine
- remove_data_object_to_machine
- list_machine_data_objects
- list_key_data_objects
📋 Changes
- It's now possible to verify additional features (beyond the 8 default features) and define feature hierarchies. You can read more about it here: https://help.cryptolens.io/web-interface/feature-templates
The major change is the introduction of the latest model used in Key.activate and Key.get_key. You can read more about it [here](https://app.cryptolens.io/docs/api/v3/Activate?modelVersion=3). Below is an excerpt from the Web API Docs about ModelVersion 3: > This model has a few changes. First, we have added a Reseller object to the LicenseKey. Secondly, we have made sure that all node-locked and floating licenses are returned (unless field masking is used). We added FloatingExpires to ActivatedMachines so that you can check when the activation was set to expire (note, this value can be overridden when calling this method with a different FloatingTimeInterval).
Thanks to @copterspace
