OnixLabs.DependencyInjection 16.6.0

dotnet add package OnixLabs.DependencyInjection --version 16.6.0
                    
NuGet\Install-Package OnixLabs.DependencyInjection -Version 16.6.0
                    
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="OnixLabs.DependencyInjection" Version="16.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnixLabs.DependencyInjection" Version="16.6.0" />
                    
Directory.Packages.props
<PackageReference Include="OnixLabs.DependencyInjection" />
                    
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 OnixLabs.DependencyInjection --version 16.6.0
                    
#r "nuget: OnixLabs.DependencyInjection, 16.6.0"
                    
#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 OnixLabs.DependencyInjection@16.6.0
                    
#: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=OnixLabs.DependencyInjection&version=16.6.0
                    
Install as a Cake Addin
#tool nuget:?package=OnixLabs.DependencyInjection&version=16.6.0
                    
Install as a Cake Tool

ONIX Labs

ONIXLabs .NET Library

.NET .NET 8.0 | 9.0 | 10.0 | 11.0 C# 15 NuGet License

The ONIXLabs .NET Library is a suite of general-purpose, production-ready libraries designed to support modern application development with a strong emphasis on correctness, composability, and value semantics. They are designed to integrate cleanly into both small utilities and large-scale systems, without imposing architectural constraints or framework lock-in.

At a high level, ONIXLabs provides:

  • Foundational primitives and patterns missing or underrepresented in the BCL
  • Functional and value-oriented abstractions for safer code
  • High-precision numeric and generic math utilities
  • Security and cryptography APIs with strong typing and value semantics
  • Infrastructure helpers that reduce boilerplate while preserving clarity

Current .NET Support includes .NET 8.0, 9.0, 10.0 and 11.0, and all packages are published to Nuget.

Package Overview

  • OnixLabs.Core – Foundational primitives, patterns, and extensions
  • OnixLabs.DependencyInjection – Configuration-driven DI registration
  • OnixLabs.Numerics – Arbitrary-precision numbers and generic math
  • OnixLabs.Security – Non-cryptographic security utilities
  • OnixLabs.Security.Cryptography – Cryptographic primitives and structures

OnixLabs.Core

See it on Nuget

Foundational primitives, patterns, and extensions that address common gaps in the .NET Base Class Library. This package provides low-level building blocks used throughout the ONIXLabs ecosystem, but is also useful as a standalone utility library in any .NET application.

  • Strongly typed enumeration pattern (Enumeration<T>)
  • Functional patterns (Optional<T>, Result, Result<T>)
  • Preconditions and guard clause utilities
  • Specification pattern with LINQ-compatible expressions (Specification<T>)
  • Value semantics interfaces (IValueEquatable<T>, IValueComparable<T>)
  • Binary conversion abstractions (IBinaryConvertible, span- and memory-based variants)
  • Collection generators with LINQ-style query support
  • Extension methods for arrays, objects, strings, comparables, random, and more
  • Extensions for IEnumerable, IEnumerable<T>, and IQueryable<T>
  • Reflection helpers for Type
  • Strongly typed Base16, Base32, Base58, and Base64 text types, including unpadded RFC 4648 base64url (Base64FormatProvider.Url)
  • Extensions for StringBuilder and Encoding

OnixLabs.DependencyInjection

See it on Nuget

Lightweight extensions for Microsoft’s dependency injection abstractions, focused on reducing boilerplate and improving configurability of service registration.

  • IServiceCollection extensions
  • Configuration-driven service lifetime selection
  • Cleaner, more consistent registration APIs

OnixLabs.Numerics

See it on Nuget

High-precision numeric types and generic math utilities for scenarios where built-in numeric types are insufficient. This package emphasizes correctness, precision, and introspection of numeric values.

  • Arbitrary-precision BigDecimal based on generic math (IFloatingPoint<T>)
  • Extended-width integer types (Int256, UInt256, Int512, UInt512)
  • Extended-precision floating-point types (Float128, Float256)
  • NumberInfo for dissecting rational numbers into constituent parts
  • Generic numeric abstractions (IBaseNumber<T>, INumber<T>)
  • Extension methods for Decimal, BigDecimal, BigInteger, and other numeric types

OnixLabs.Security

See it on Nuget

Non-cryptographic security utilities focused on safe generation and handling of security-related values.

  • SecurityToken generation
  • Support for pseudo-random and cryptographically secure RNGs
  • Configurable token alphabets (upper, lower, numeric, special characters)

OnixLabs.Security.Cryptography

See it on Nuget

Strongly typed cryptographic primitives and structures with value semantics, designed to make cryptographic operations safer and more explicit.

  • Public and private key abstractions (PublicKey, PrivateKey)
  • ECDH, ECDSA, and RSA key implementations
  • Fully managed EdDSA (Ed25519) key implementation (EddsaPrivateKey, EddsaPublicKey)
  • Ed25519 to X25519 public key conversion (EddsaPublicKey.ToXdhPublicKey), by the birational map of RFC 7748, refusing invalid keys and points of small order
  • X25519 Diffie-Hellman key implementation (XdhPrivateKey, XdhPublicKey) on every target framework, using .NET's own X25519 where it is supported and managed code elsewhere
  • Raw shared secrets for key derivation (DeriveRawSharedSecret) as well as hashed ones (DeriveSharedSecret), on both ECDH and X25519 keys, with public key validation
  • AES-CBC-HMAC-SHA2 authenticated encryption (AesCbcHmacSha2): A128CBC-HS256, A192CBC-HS384 and A256CBC-HS512 from RFC 7518, chosen by the key's length, shaped like .NET's AesGcm
  • secp256k1 ECDSA signature verification (JOSE ES256K) through EcdsaPublicKey on every platform, using the platform's implementation where it supports the curve and managed code elsewhere
  • ECIES public-key encryption (Ecies, an ECAlgorithm used like .NET's RSA) on P-256, P-384 and P-521, in the SEC 1 variants that EciesScheme names, tested against Bouncy Castle's implementation of SEC 1
  • JOSE, in the OnixLabs.Security.Cryptography.Jose namespace, with exactly what DIDComm Messaging v2.1 needs to sign and encrypt messages:
    • JSON Web Keys (JsonWebKey): OKP (X25519, Ed25519) and EC (P-256, P-384, P-521, secp256k1), converted to and from the library's key types, with RFC 7638 thumbprints
    • JSON Web Signatures (JsonWebSignature) in the General and Flattened JSON serializations, signing with EdDSA, ES256, ES384 and ES512, and verifying those and ES256K
    • JSON Web Encryption (JsonWebEncryption) in the General JSON serialization, with ECDH-ES+A256KW (anoncrypt) and ECDH-1PU+A256KW (authcrypt) on X25519, P-256, P-384 and P-521, and A256CBC-HS512 or A256GCM content encryption, including the Concat KDF, ECDH-1PU, AES Key Wrap (RFC 3394) and AES-CBC-HMAC-SHA2 they rely on
    • Signing (IJwsSigner) and key agreement (IJweKeyAgreement) through interfaces, so that private keys can stay inside a key store
    • The JOSE Concat KDF OtherInfo (JweOtherInfo), and the DIDComm apu and apv values (JweAgreementInfo)
  • Digital signature types (DigitalSignature, DigitalSignatureAndPublicKey)
  • Cryptographic hash value types (Hash, NamedHash)
  • Extensions for HashAlgorithm
  • FIPS-202 SHA-3 implementation (SHA3-224/256/384/512, SHAKE128/256) on every platform, with .NET's static HashData methods, using .NET's own SHA-3 where it is supported and managed code elsewhere
  • Merkle tree implementations (MerkleTree, MerkleTree<T>)
  • Cryptographic salt value type (Salt)
  • Encrypted-in-memory secret handling (Secret)
  • Common cryptographic primitive abstraction (ICryptoPrimitive)
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 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.  net11.0 is compatible. 
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
16.6.0 60 12/1/2026
16.5.0 56 12/1/2026
16.4.0 99 11/20/2026
16.3.0 105 11/19/2026
16.2.0 98 11/13/2026
16.1.0 112 10/28/2026
16.0.1 101 10/28/2026
16.0.0 290 10/22/2026
15.0.1 100 10/22/2026
15.0.0 183 5/25/2026
14.0.0 190 1/30/2026
13.0.0 345 12/17/2025
12.2.0 242 10/23/2025
12.1.1 258 4/23/2025
12.1.0 263 4/22/2025
12.0.0 302 1/31/2025
11.3.0 220 1/14/2025
11.2.0 202 1/11/2025
11.1.0 211 1/5/2025
11.0.0 229 12/18/2024
Loading failed