Releases: Cryptolens/cryptolens-python
v_20: Fix error handling
Fix error handling in Python 2 and 3
v_19: Add Get Web API Log method
Add GetWebAPILog method (#22) * Update methods.py * Update setup.py
v_18: Catch an if no internet connection is present
Fixes #21.
Thanks to @jamiesandenr.
v_17: Add FriendlyName support
We have updated both Python 2 and 3 libraries so that a friendly_name
can be registered during activation. To get the same value as Environment.MachineName?
, you can set the friendly name to socket.gethostname()
. Below is an example of how to set it when calling Key.activate
:
from licensing.models import *
from licensing.methods import Key, Helpers
import socket
res = Key.activate(token="WyIyNzMyIiwiYmx6NlJ6ZzdaWjFScmxFVFNCc283YTJyUG5kQURMZ0hucW1YdUZxKyJd",\
rsa_pub_key=pubKey,\
product_id=3349, key="ICVLD-VVSZR-ZTICT-YKGXL", machine_code=Helpers.GetMachineCode(),\
friendly_name=socket.gethostname())
Note: if the device was already activated once, the friendly name will not get updated. However, Web API Log will still contain a record of the friendly name.
v_16: Show more detailed error messages
We have updated the Python 2 and Python 3 client libraries so that they show more detailed error messages.
For more information about common errors and how to fix them, please check out the following article: https://help.cryptolens.io/faq/index#troubleshooting-api-errors
v_15: Generate the same machine code as in the .NET Client
If you call Helpers.GetMachineCode(v=2)
in the Python library, it will return the same machine code (assuming it's on the same machine) as Helpers.GetMachineCodePI(v: 2)
in .NET (on Windows). In a future release, we plan to have an option to get a machine code that is the same across all OS.
Thanks to @pmnforce
v_14: Add GetKey method
Add GetKey to python2, closes #18
v_13: Remove dependency on pycryptodome
Added @svedi's code to verify RSA signatures
v_12: Fix Helpers.GetMachineCode() on Mac
This release includes a fix for Helpers.GetMachineCode() on Mac. Two problems were solved:
- In Python 3, there is no need to decode the string again (to utf-8). Fixes #15.
- In both Python 2 & 3, the machine code was not returned from the method.
v_11: Fix behaviour of Deactivate and CreateTrialKey when an API error has occured
Previously, Deactivate and CreateTrialKey would not notice an API error since "result" parameter was an integer but the library treated it as an integer.
This is now fixed to in this release. Moreover, we have added an additional check in case the result parameter is not present at all (for rare 500 errors).