Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

license_tool_ias-0.1.2-cp311-cp311-win_amd64.whl (96.5 kB view details)

Uploaded CPython 3.11Windows x86-64

license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl (129.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_aarch64.whl (127.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl (127.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_aarch64.whl (128.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

Details for the file license_tool_ias-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for license_tool_ias-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b34be63218d6b00af00f9ec2302cfc8073c0432f2929dd9e374e6ee3c4bb9837
MD5 cbdcd5cd75dfec4cdf977ab744597bfb
BLAKE2b-256 72977c1893fff7272a42aea65d1b7f04b6b75d3aa0cb23b356f9a178e89493ae

See more details on using hashes here.

File details

Details for the file license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ddb9ddd5adf9928da1945fc85bbb2097a8afe0439388b9817fe9246037a15582
MD5 48f6c632d4c38225acee09b7fe961b17
BLAKE2b-256 79f4e89d85f6f5ed0857add86b1cca9d8371e5b14897cd59cc72c91b00f22d46

See more details on using hashes here.

File details

Details for the file license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for license_tool_ias-0.1.2-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cb88b998d12375f807c90e05d2f91e0425fe6f3275c7eeb5113adbe9ab5d560d
MD5 d9571867f29abee5486b4d7baa6d5532
BLAKE2b-256 c79a26690e609b1330fd477fdfe077d429a1a118d76f3ba3e5ec6222fa179074

See more details on using hashes here.

File details

Details for the file license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ca3af667fcf32a0758d5021cf32436d2df54571fa4bf3bff4ba776d782842e4b
MD5 7aafb557a1eb13b938ddfee67fd6b02d
BLAKE2b-256 cd776c131bcf8ae9f78955129a4e4a928221e87a01bf5c30eaabb2529b4b4de1

See more details on using hashes here.

File details

Details for the file license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for license_tool_ias-0.1.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cb98dd5870436e3e9ff2e5776cbdd147567a2be5e8f8a5a77c4792ccfeab3f85
MD5 f728f1ee4fbfd486601bc1299eb9fde3
BLAKE2b-256 03ca8ba1bd22fc2ade55bde41cdff984fc6b61fee5f8733ccece08c647b5e859

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page