SDKs
Python — devkanan
pip install devkanan
Activate online
from devkanan import Key, Helpers
result, msg = Key.activate(
token=ACCESS_TOKEN,
rsa_pub_key=RSA_PUBLIC_KEY,
product_id=100000,
key="ABCD-EFGH-IJKL-MNOP",
machine_code=Helpers.GetMachineCode(v=2),
floating_time_interval=300,
server_url="https://devkanan.dev",
)
Validate offline (signed .dat)
from devkanan import LicenseKey, Helpers
with open("license.dat", encoding="utf-8-sig") as f:
lk = LicenseKey.load_from_string(RSA_PUB_KEY, f.read(), max_age_days=1)
if lk and lk.is_on_right_machine(Helpers.GetMachineCode(v=2)) and lk.has_not_expired():
start_app()
Usage credits
from devkanan import Credits
ok, balance, msg = Credits.record(
token=ACCESS_TOKEN, product_id=100000, key=LICENSE,
amount=10, feature="export_pdf",
)
.NET
Our .NET SDK is a derivative fork of the Cryptolens project (Apache 2.0), adapted for DevKanan. The public API is compatible with existing code that uses the Cryptolens client — just change the
serverAddress.
var result = Key.Activate(
token: ACCESS_TOKEN,
RSAPublicKey: RSA_PUBLIC_KEY,
productId: 100000,
key: "ABCD-EFGH-IJKL-MNOP",
machineCode: Helpers.GetMachineCode(),
serverAddress: "https://devkanan.dev"
);