Example algo package with Cython-compiled submodules
Project description
🔐 License Tool
License Tool 是一個 基於 RSA 簽名驗證 的授權管理套件,提供:
- ✅ License 簽署(sign)
- ✅ License 驗證(verify)
- ✅ RSA 金鑰自動生成(genkeys)
📚 目錄
🚀 安裝方式
1️⃣ 本地安裝(開發模式)
git clone https://your.repo/license_tool.git
cd license_tool
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
使用方式
- 必須進入license_tool的虛擬環境
- 查看指令功能
license-tool -h license-tool genkeys -h license-tool sign -h license-tool verify -h
金鑰產生
⚠️ gitlab clone下來的專案已經有keys
⚠️已經有金鑰就不要重複產生,否則金鑰可能覆蓋,造成已經生成的license失效
- 指令:
license-tool genkeys <output_dir>
- 範例: license-tool genkeys keys
- 📂 會產生以下兩個檔案:
keys/private.pem(⚠️ private.pem 絕對不能給出)keys/public.pem
License 生成
- 指令:
license-tool sign <license_file_path> <private_key>
- 範例: license-tool sign example/license.json keys/private.pem
- License file 格式請參考下列範例
{ "custom_name": "IOTech", "macs": [ "c8:d9:d2:19:fa:2c", "08:00:27:a6:59:dd", "08:00:27:6f:f7:c0" ], "expire_date": "2025-12-31 23:59:59", "deploy_cnt": "2", "signature": "" }
⚠️
license.json是原始未簽名的檔案,license_out.json是經簽名後產生的授權檔案,包含合法的signature欄位。
License 驗證
- 指令:
license-tool verify <license_path> <public_key> <host_mac>
- 範例: license-tool verify example/license_out.json keys/public.pem 08:00:27:6f:f7:c0
提交內容
- license檔案: 例如範例中的license_out.json
- Public Key: 例如範例中的public.pem
⚠️ Private Key 絕對不能給出
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file license_tool_ias-0.2.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: license_tool_ias-0.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 98.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ca68fbd0d99c03e0f1400c444842cc5b830ab358d8ad07535c5528ec62f3ef8
|
|
| MD5 |
40e981953b60524b53a6e61fc171fdbf
|
|
| BLAKE2b-256 |
b91255d4ebf8d5d298d499f042c4dfac799dfb208a6a1a923e56fd212be2ff50
|
File details
Details for the file license_tool_ias-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: license_tool_ias-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 133.5 kB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a833cb2aa0a545f151f3bc540605085d255341da65abafb23d7ee1cf908d4e4a
|
|
| MD5 |
da89ed7cb1c8f59814021ecf98ec743c
|
|
| BLAKE2b-256 |
3111100afd16299d2d53dc035e5a065e48898afcba0978849f6b4a881aa30e4e
|
File details
Details for the file license_tool_ias-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: license_tool_ias-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 131.2 kB
- Tags: CPython 3.11, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98d70ecd2689d1b06cf5f4c48f0652745242d9419b6c22d9b8908634b2c74e7d
|
|
| MD5 |
b7fec8edd5a8d16f48c9c74709523685
|
|
| BLAKE2b-256 |
d13229dea457774e7819817c5d713cce184d46278318deee633004b627f53ee2
|
File details
Details for the file license_tool_ias-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: license_tool_ias-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 132.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85e663b7919348579074fc26bac041e8eef8e5994bfd61763016fa2c34418000
|
|
| MD5 |
3b8f259e2a8a61a8c2b87dd861f6ba34
|
|
| BLAKE2b-256 |
8073f0f48cd597000497b411adfac90e714b3542f0db8087366f9817fc603640
|
File details
Details for the file license_tool_ias-0.2.0-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: license_tool_ias-0.2.0-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 132.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a4935d0d77b7024bc9425082e96cab70cc9c8e4b6261aeb2d6493cc8baf6c57
|
|
| MD5 |
a96a45e5063f6e1bca5cd6a03d375073
|
|
| BLAKE2b-256 |
03c789df4245c8f02cfa018992d4acf03798de122f86302b8d8c6910e906e0a1
|