Portable way to uniquely identify machine



  • Hello everyone, it's been a while!

    I'm starting a new project based on qt, this one will be a commercial program. For licensing purposes, i need a portable way of identifying a device on which the software will be running, with a few features in mind:

    • Portable: at least linux, mac, windows - preferably also for android and ios.
    • (on desktop platforms) Will not change if the user adds RAM, or changes hard disk(s) / cpu / network card(s) etc.
    • Therefore preferably based on the motherboard or some other basic component of the machine
    • Solid: something like a UUID would be great.

    ....any idea what class and/or function(s) i could use for this? Any advice will be greatly appreciated!


  • Moderators

    @delt said:

    something like a UUID would be great

    Hi! We have QUuid Class.



  • Hello, guten Tag!

    Thanks for the info about the QUuid class. But i can't find any function in that class that generates a key for identifying the device at run-time.


  • Moderators

    @delt
    take a look at QtSystems module. This module is still WIP and probably not as stable/portable yet. Will hopefully be merged to Qt master sometime in the future.

    nevertheless it's worth checking it out. It contains a QDeviceInfo class. It has a method uniqueDeviceID().
    But i doubt it fits your mentioned requirements.

    Since you want to allow certain HW changes on the system you would need to use the operating system's facilities to get the information yourself. On mobile platforms you could sue IMEI for example.
    On desktop platforms many applications use the network MAC address to identify a system. Since it's easy to retrieve and implicitly unique. But be aware that the MAC address can easily be changed by the user using some programs. So i wouldn't let rely any critical application on this.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.