JunkieKeySystem.CSharp 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package JunkieKeySystem.CSharp --version 1.0.1
                    
NuGet\Install-Package JunkieKeySystem.CSharp -Version 1.0.1
                    
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="JunkieKeySystem.CSharp" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JunkieKeySystem.CSharp" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="JunkieKeySystem.CSharp" />
                    
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 JunkieKeySystem.CSharp --version 1.0.1
                    
#r "nuget: JunkieKeySystem.CSharp, 1.0.1"
                    
#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 JunkieKeySystem.CSharp@1.0.1
                    
#: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=JunkieKeySystem.CSharp&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=JunkieKeySystem.CSharp&version=1.0.1
                    
Install as a Cake Tool

Official C# SDK for the Junkie Development Key System with advanced security features and hardened multi-stage verification.

Features

  • 🔐 Hardened Security: Multi-stage verification with cryptographic signatures
  • 🛡️ Anti-Tampering: Built-in security validation and integrity checks
  • 🚀 Easy Integration: Simple static API for quick implementation
  • 📊 Detailed Responses: Comprehensive verification data and status information
  • 🔑 Keyless Mode: Support for keyless authentication when enabled
  • 🖥️ Hardware ID: Automatic hardware fingerprinting for device binding
  • Async/Await: Full async support for optimal performance
  • 🔒 MIT Licensed: Open source with permissive licensing

Installation

Package Manager

Install-Package JunkieKeySystem.CSharp

.NET CLI

dotnet add package JunkieKeySystem.CSharp

PackageReference

<PackageReference Include="JunkieKeySystem.CSharp" Version="1.0.0" />

Quick Start

Basic Key Verification

using JunkieKeySystem.CSharp;

// Simple key verification
bool isValid = await JunkieKeySystem.VerifyKeyAsync("your-api-key", "user-key", "your-service");
if (isValid)
{
    Console.WriteLine("Key is valid!");
}
else
{
    Console.WriteLine("Key verification failed.");
}

Detailed Key Verification

using JunkieKeySystem.CSharp;
using JunkieKeySystem.CSharp.Models;

// Get detailed verification information
var verificationData = await JunkieKeySystem.VerifyKeyDetailedAsync("your-api-key", "user-key", "your-service");
if (verificationData != null)
{
    Console.WriteLine($"Key created: {verificationData.CreatedAt}");
    Console.WriteLine($"Security level: {verificationData.SecurityLevel}");
    Console.WriteLine($"Is premium: {verificationData.IsPremium}");
    Console.WriteLine($"Is invalidated: {verificationData.IsInvalidated}");
}

Keyless Mode Check

// Check if keyless mode is active
bool isKeyless = await JunkieKeySystem.IsKeylessModeAsync("your-api-key", "your-service");
if (isKeyless)
{
    Console.WriteLine("Keyless mode is active - no key required!");
}
// Generate a verification link for users
string? link = await JunkieKeySystem.GetLinkAsync("your-api-key", "provider-name", "service-name");
if (link != null)
{
    Console.WriteLine($"Verification link: {link}");
}

Hardware ID Generation

// Generate a unique hardware ID for the current machine
string hardwareId = JunkieKeySystem.GenerateHardwareId();
Console.WriteLine($"Hardware ID: {hardwareId}");

Advanced Usage

Using the Client Directly

For more control over the HTTP client lifecycle:

using JunkieKeySystem.CSharp.Core;

using var client = new JunkieKeySystemClient("your-api-key");

// Use the client
bool isValid = await client.VerifyKeyAsync("user-key", "your-service");
var details = await client.VerifyKeyDetailedAsync("user-key", "your-service");
bool isKeyless = await client.IsKeylessModeAsync("your-service");

## API Reference

### Static Methods

#### `VerifyKeyAsync(string apiKey, string key, string service)`
Verifies a key for the specified service using hardened multi-stage verification.

**Parameters:**
- `apiKey`: Your API key from Junkie Development
- `key`: The key to verify
- `service`: The service name

**Returns:** `Task<bool>` - True if the key is valid, false otherwise

#### `VerifyKeyDetailedAsync(string apiKey, string key, string service)`
Verifies a key with detailed response information.

**Returns:** `Task<KeyVerificationData?>` - Key verification data, or null if verification failed

#### `IsKeylessModeAsync(string apiKey, string service)`
Checks if the current environment is in keyless mode.

**Returns:** `Task<bool>` - True if keyless mode is active, false otherwise

#### `GetLinkAsync(string apiKey, string provider, string service)`
Gets a verification link for the specified provider and service.

**Returns:** `Task<string?>` - The verification link URL, or null if failed

#### `GenerateHardwareId()`
Generates a hardware ID for the current machine.

**Returns:** `string` - A unique hardware ID

### Data Models

#### `KeyVerificationData`
Contains detailed information about key verification:

```csharp
public class KeyVerificationData
{
    public DateTime CreatedAt { get; set; }
    public DateTime ExpiresAt { get; set; }
    public bool IsOneTimeUse { get; set; }
    public bool IsInvalidated { get; set; }
    public bool IsHwidBanned { get; set; }
    public bool IsPremium { get; set; }
    public string? SecurityLevel { get; set; }
    public string? VerificationToken { get; set; }
    public ServerState? ServerState { get; set; }
}

Requirements

  • .NET
  • Windows, macOS, or Linux
  • Internet connection for API calls

Error Handling

The SDK handles errors gracefully and returns appropriate values:

  • VerifyKeyAsync returns false on any error
  • VerifyKeyDetailedAsync returns null on any error
  • IsKeylessModeAsync returns false on any error
  • GetLinkAsync returns null on any error

For detailed error information, use the client directly and check the returned data structures.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, feature requests, or bug reports, please contact Junkie Development.

Changelog

Version 1.0.1

  • Initial release
  • Verification
  • Hardware ID generation
  • Keyless mode support
  • Detailed verification responses
  • Full async/await support

Junkie Development - Secure, reliable, and easy-to-use key management solutions.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2.0.3 103 3/23/2026
2.0.2 98 3/23/2026
2.0.1 115 2/28/2026
2.0.0 107 2/24/2026
1.0.1 191 10/6/2025