LicenseGenerator 1.0.5

dotnet add package LicenseGenerator --version 1.0.5
                    
NuGet\Install-Package LicenseGenerator -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LicenseGenerator" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LicenseGenerator" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="LicenseGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LicenseGenerator --version 1.0.5
                    
#r "nuget: LicenseGenerator, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LicenseGenerator@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LicenseGenerator&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=LicenseGenerator&version=1.0.5
                    
Install as a Cake Tool

LicenseGenerator

A .NET 10 library for software licensing: generate serial keys, read a machine fingerprint on Windows, and hash license data.

Install

dotnet add package LicenseGenerator

Requirements: .NET 10.0 or later. requestKey() requires Windows.

Quick start

The namespace and main class share the name LicenseGenerator. Use a type alias:

using LG = LicenseGenerator.LicenseGenerator;

string serial = LG.GetSerialKeyAlphaNumaric(segment: 4, digits: 4);
string machineKey = LG.requestKey();          // Windows only
string licenseHash = LG.GetHash($"{serial}-{machineKey}");

API

GetSerialKeyAlphaNumaric(int segment, int digits)

Generates an uppercase alphanumeric key from a new Guid, grouped with - separators.

Total length = segment × digits. Supported lengths: 16, 18, 20, 24, 28, 32.

Call Example shape
(4, 4) XXXX-XXXX-XXXX-XXXX
(6, 3) XXX-XXX-XXX-XXX-XXX-XXX
(5, 4) XXXX-XXXX-XXXX-XXXX-XXXX
(6, 4) XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
(7, 4) XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
(8, 4) XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

GetSerialKeyNumaric(SNKeyNumLength keyLength)

Generates a numeric-only key. Length options: SN4, SN8, SN12.

string key = LG.GetSerialKeyNumaric(SNKeyNumLength.SN8);

requestKey() — Windows only

Returns a CPU hardware fingerprint via WMI (Win32_Processor).

#if WINDOWS
string cpuFingerprint = LG.requestKey();
#endif

GetHash(string input)

Returns an uppercase MD5 hash with - every 4 hex characters.

string hash = LG.GetHash("my-license-data");

Example: license activation

using LG = LicenseGenerator.LicenseGenerator;

string serial = LG.GetSerialKeyAlphaNumaric(4, 4);
string machineId = LG.requestKey();
string activationCode = LG.GetHash($"{serial}|{machineId}");

Platform support

API Windows Linux / macOS
GetSerialKeyAlphaNumaric
GetSerialKeyNumaric
GetHash
requestKey

📞 Support

For issues or questions, please contact us:


Made with ❤️ for the .NET Developers

#DotNet #NuGet #Licensing #SerialKey #CSharp #BackOffice

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 95 5/20/2026
1.0.4 86 5/20/2026
1.0.3 89 5/20/2026
1.0.2 90 5/20/2026