LicenseGenerator 1.0.5
dotnet add package LicenseGenerator --version 1.0.5
NuGet\Install-Package LicenseGenerator -Version 1.0.5
<PackageReference Include="LicenseGenerator" Version="1.0.5" />
<PackageVersion Include="LicenseGenerator" Version="1.0.5" />
<PackageReference Include="LicenseGenerator" />
paket add LicenseGenerator --version 1.0.5
#r "nuget: LicenseGenerator, 1.0.5"
#:package LicenseGenerator@1.0.5
#addin nuget:?package=LicenseGenerator&version=1.0.5
#tool nuget:?package=LicenseGenerator&version=1.0.5
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:
- LinkedIn: linkedin.com/in/waelelazizy
- Email: info@waelelazizy.com
- KSA: 0553373500
- Bahrain: 00973 33030730
Made with ❤️ for the .NET Developers
#DotNet #NuGet #Licensing #SerialKey #CSharp #BackOffice
| Product | Versions 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. |
-
net10.0
- System.Management (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.