JunkieKeySystem.CSharp
1.0.1
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
<PackageReference Include="JunkieKeySystem.CSharp" Version="1.0.1" />
<PackageVersion Include="JunkieKeySystem.CSharp" Version="1.0.1" />
<PackageReference Include="JunkieKeySystem.CSharp" />
paket add JunkieKeySystem.CSharp --version 1.0.1
#r "nuget: JunkieKeySystem.CSharp, 1.0.1"
#:package JunkieKeySystem.CSharp@1.0.1
#addin nuget:?package=JunkieKeySystem.CSharp&version=1.0.1
#tool nuget:?package=JunkieKeySystem.CSharp&version=1.0.1
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 Verification Link
// 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:
VerifyKeyAsyncreturnsfalseon any errorVerifyKeyDetailedAsyncreturnsnullon any errorIsKeylessModeAsyncreturnsfalseon any errorGetLinkAsyncreturnsnullon 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 | Versions 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. |
-
.NETStandard 2.0
- BouncyCastle.NetCore (>= 2.2.1)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.4)
- System.Management (>= 9.0.9)
- System.Security.Cryptography.Algorithms (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.