We are continuing our work on making the .NET SDK cross platform. In the latest release of our .NET library, we have added support for machine code computation on Raspberry Pi and improved the existing support for Linux.
Image of Raspberry Pi 4 Model B. Credits Michael Henzler. License CC BY-SA 4.0.
From a licensing perspective, being able to identify a device is important in order to make it possible to limit the number of end users that may use the same license. Treating a device id as an end user is very common, even though an end user can also be defined in other ways too (for example, to include the process id or username).
How to get started
To get access to the updated methods, you just need to upgrade to the new cross platform version of the library.
dotnet add package Cryptolens.Licensing.CrossPlatform
In that version of the library, both Helpers.GetMachineCode and Helpers.GetMachineCodePI work the same way. If you prefer to use the pre-compiled binaries, these can be obtained here. It’s important to use the ones in the “Without System.Management” folder.
How it works
Every Raspberry Pi board comes with a unique serial number. The updated methods first determine whether it is a Raspberry Pi board, and if it is, hash the serial number. The machine code is of the structure “RPI_{SHA256(serial number)}”. More technical information is available in the release notes.
Related articles
- Key verification example (code snippet to verify a license key)
- Node-locking (restricting the number of end users of the same license)
- Floating licenses (similar to node-locking, but allows automatic deactivation of unused devices)