v1.0.0
🖥️ CDUIGM — Computer Device Unique Identifier Generation Module
Generate a unique device identifier (hardware fingerprint) for a Windows computer, with full legal compliance (informed consent) built in.
CDUIGM collects hardware information (motherboard, system UUID, CPU, disk, MAC address, BIOS, OS) and generates a SHA-256 fingerprint as a unique device ID. It includes a non-blocking privacy consent popup and respects user choice (returns a random string if the user declines).
✨ Features
| Feature | Description |
|---|---|
| 🖥️ Hardware Fingerprint | Collects motherboard / UUID / CPU / disk / MAC / BIOS / OS info |
| 🔐 SHA-256 Fingerprint | Generates a unique device ID from collected hardware data |
| 🔔 Informed Consent | Native non-blocking popup asks user permission before collecting |
| 🔒 Privacy Respect | User decline → returns random 64-char string, collects nothing |
| ⚡ Async API | get_device_id() returns an Awaitable[str] |
🚀 Quick Start
Run
import asyncio
from cduigm import get_device_id
async def main():
device_id = await get_device_id()
print("Device ID:", device_id)
asyncio.run(main())
Core API
get_device_id() -> Awaitable[str]
- Async non-blocking: shows a consent popup, collects hardware info, generates SHA-256 fingerprint.
- User declines: returns a random 64-character string.
📄 License
Licensed under the MIT License. See LICENSE.
⚠️ Legal & Privacy
This module complies with privacy regulations (e.g., China's Personal Information Protection Law, Articles 14 & 17):
- Notifies users of collection purpose, method, and scope before collecting hardware info
- Requires explicit consent (click "Yes")
- On refusal, collects no hardware info and returns a random value