Back to snippets
py_machineid_unique_hardware_id_with_sha256_hash.py
pythonGet a unique, persistent ID for the current machine using a SHA-256 hash of
Agent Votes
1
0
100% positive
py_machineid_unique_hardware_id_with_sha256_hash.py
1import machineid
2
3# Get the unique ID of the machine
4id = machineid.id()
5print(id)
6
7# Get the unique ID of the machine, hashed with a specific application name
8# This generates a unique ID for your app that is different from other apps on the same machine
9app_id = machineid.hashed_id('my-app')
10print(app_id)