Skip to content

Releases: onix-labs/onixlabs-dotnet

Version 11.0.0

18 Dec 00:23
Compare
Choose a tag to compare

ONIXLabs DotNET Library 11

We are excited to announce the release of ONIXLabs .NET Library version 11, now available on NuGet.

Core Updates

New extension methods have been added to obtain DateOnly and TimeOnly components from DateTime instances.

Security.Cryptography Updates

The existing public/private key import/export APIs have been overhauled to provide a cleaner, more consistent, and more robust experience for importing and exporting public and private keys. This now includes support for binary, PKCS8 and PEM imports and exports, including support for encrypted imports and exports.

Breaking Changes

  • The IPublicKeyExportable interface was originally implemented by private keys from which a public key could be derived. Since this interface name needed to be repurposed for public key implementations that can be exported, the interface name has changed to IPrivateKeyDerivable, indicating that its implementation is intended on private keys, and that something can be derived from the private key.
  • The IPrivateKeyImportablePkcs8 and IPrivateKeyExportablePkcs8 interfaces have been renamed to IPrivateKeyImportable and IPrivateKeyExportable, since they now support import and export APIs other than PKCS8.

Version 10.0.0

16 Nov 00:16
Compare
Choose a tag to compare

ONIXLabs DotNET Library 10

We are excited to announce the release of ONIXLabs .NET Library version 10, now available on NuGet.

This release updates the library to use .NET 9.0 and utilizes new language features in C# 13.

All of the underlying NuGet dependencies have also been updated to the latest available versions, although this has zero impact on the libraries themselves as they are designed to be as lightweight as possible, and therefore dependency free. Notably, it's the test projects that require NuGet dependencies.

Core Updates

Collection initialiser functions now utilise params collections, so there is no longer a need to convert from an array to the desired type.

Breaking Changes

In a move towards immutable, safe code with fewer memory allocations, this release includes several breaking changes cascading from IBinaryConvertible. This interface no longer exposes a ToByteArray method. Instead, a new IMemoryBinaryConvertible interface exists which exposes an AsReadOnlyMemory method. Similarly, ISpanBinaryConvertible has been modified to align, so the method ToReadOnlySpan has been renamed to AsReadOnlySpan. IBinaryConvertible is now a composite of ISpanBinaryConvertible, and IMemoryBinaryConvertible.

Since the IBinaryConvertible and ISpanBinaryConvertible interfaces have changed, this has cascaded into several types in the OnixLabs.Core.Text, and OnixLabs.Security.Cryptography namespaces.

Obsolete APIs have also been removed in this release.

Version 9.5.1

18 Oct 12:21
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.5.1

We are excited to announce the release of ONIXLabs .NET Library version 9.5.1, now available on NuGet.

Cryptography Updates

This version fixes a bug in the SHA 3 implementation, where transforming multiple blocks of data resulted in erroneous hashes. This was due to the sponge state being reset every time HashCore was called, and has now been fixed and tested.

Version 9.5.0

10 Sep 10:48
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.5.0

We are excited to announce the release of ONIXLabs .NET Library version 9.5.0, now available on NuGet. This version includes new features and associated unit tests.

Core Updates

Deprecates the GetName method and TypeNameFlags enumeration in the OnixLabs.Core.Reflection package, in favour of the new GetCSharpTypeDeclaration method, and TypeDeclarationFlags enumeration.

Dependency Injection

This is a new package that introduces several new extension methods for IServiceCollection. All AddService methods accept a ServiceLifetime, which means that services can be configured (as opposed to hard-coded) as singleton, scoped, or transient.

Version 9.4.0

18 Aug 22:25
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.4.0

We are excited to announce the release of ONIXLabs .NET Library version 9.4.0, now available on NuGet. This version includes new features and associated unit tests.

Core Updates

  • Adds a comprehensive suite of overloads for MatchAsync, SelectAsync, and SelectManyAsync on Result and Result<T> types.
  • Adds extension methods to bind MatchAsync, SelectAsync and SelectManyAsync methods into async workflows.
  • Adds extension methods for Random allowing a random element of a ReadOnlyList<T> to be obtained.

Version 9.3.0

09 Aug 09:31
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.3.0

We are excited to announce the release of ONIXLabs .NET Library version 9.3.0, now available on NuGet. This version includes new features and associated unit tests.

Core Updates

  • Updated Preconditions to return values from inclusive or exclusive checks if they are valid.

Version 9.2.0

31 Jul 23:36
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.2.0

We are excited to announce the release of ONIXLabs .NET Library version 9.2.0, now available on NuGet. This version includes new features and associated unit tests.

Core Updates

  • Introduced new pre-condition checks and requirements to check Result, Result<T> and Optional<T> types.
  • Re-added collection generator functions.

Whilst collection expressions are a much welcomed addition to .NET, they have their limitations; i.e. you cannot chain functions to the end of a collection expression; for example;

List<int> numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].Where(number => number % 2 is 0);

In contrast, this can be done with collection generators; for example:

List<int> numbers = ListOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Where(number => number % 2 is 0);

Version 9.1.0

23 Jul 13:36
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.1.0

We are excited to announce the release of ONIXLabs .NET Library version 9.1.0, now available on NuGet. This version includes new features and associated unit tests.

Numerics Updates

  • Introduced new GenericMath.Factorial method which computes the factorial of a given integer.

Cryptography Updates

  • Added new Hash.Compute overloads that accept ReadOnlySpan<byte>, IBinaryConvertible and ISpanBinaryConvertible.
  • Added new Salt constructor that accepts a ReadOnlySequence<byte>.

Version 9.0.0

19 Jul 15:00
Compare
Choose a tag to compare

ONIXLabs .NET Library 9.0.0

We are excited to announce the release of ONIXLabs .NET Library version 9.0.0, now available on NuGet. This version includes significant new features, enhanced code coverage, and improved performance. The entire codebase has been thoroughly analyzed and refactored to reduce heap allocations, eliminate unnecessary virtual method calls, and optimize computationally intensive algorithms.

Core Updates

  • Introducing the new ISpanBinaryConvertible interface, enabling objects to return their underlying byte array as a ReadOnlySpan<T>. This allows consumers to work with the original object's bytes without mutation or additional allocations.

  • Adding new LINQ-like extension methods for non-generic IEnumerable, such as Count, LongCount, ForEach, GetContentHashCode, IsEmpty, IsNotEmpty, IsSingle, IsCountEven, IsCountOdd, JoinToString, and ToCollectionString.

  • Result<T> now implements IDisposable and IAsyncDisposable, allowing for use in using and async using statements. This ensures proper disposal of underlying values that implement these interfaces.

  • Adding async method extensions for Result, Result<T>, and Optional<T>, facilitating seamless integration into async workflows.

  • Enhancing pre-condition guard clauses to handle nullable structs and strings that are null, empty, or whitespace.

  • Updating the GetName extension to support formatting with full type names and generic type arguments, configurable via the new TypeNameFlags enumeration.

  • Improving the ToRecordString extension to support more expressive record-like strings, including formatting for collection types and null values.

Cryptography Updates

  • Introducing new record types: NamedHash, NamedPrivateKey, NamedPublicKey, and DigitalSignatureAndPublicKey.

  • Fixing an issue in the SHA3 implementation where the hash length was incorrectly set.

Version 8.16.0

02 Jul 14:16
Compare
Choose a tag to compare
Merge branch 'refs/heads/main' into release