DOCUMENTATION

Search Knowledge Base by Keyword

Generating a Unique DeviceID

Last Updated On April 30, 2019
< Back

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:

  • UUID
  • 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.

WINDOWS

The simplest way to generate a unique device id on windows is to use the buid in “wmic” command:

wmic csproduct get UUID

LINUX

Here a nice reference to Linux UUIDs.

.NET

DeviceId is an open souce C# library that facilitates building custom composite device identifiers using a quick-and-easy fluent interface.