Generating a Unique DeviceID
In order to adequately protect your system (i.e., make sure a license key is not used on multiple machines), your software has to generate a unique device ID. This is usually a combination of:
- Processor ID
- Motherboard ID
- Machine ID
- (Virtual) MAC Address
- Other custom ID
As a vendor you (not SLASCONE) have to decide what suits more to your application, in other words how restrictive you want to be.
It should be noted though, that there is a trade-off between security and customer convenience. Increasing the number of identifiers (e.g., MAC + Processor ID), increases the probability of a new unique identifier upon hardware change.
SLASCONE recommends using the UUID and optionally adding the (virtual) MAC Address.
The simplest way to generate a unique device id on windows is to use the buid in “wmic” command:
wmic csproduct get UUID
Here a nice reference to Linux UUIDs.
DeviceId is an open souce C# library that facilitates building custom composite device identifiers using a quick-and-easy fluent interface.