Skip to content
Xen edited this page Sep 3, 2025 · 3 revisions

Introducing version 5.0.0, the next major release of HashifyNET with many major changes. With this release, we flag the library as ready for production, so feel free to use it in your real projects.

Here's a brief list consulting the highlighted changes:

  • No more factory access through "Instance" singleton. The API now handles this behind the scenes, without extending the path. Feel free to do HashFactory<ICRC>.Create();.
  • HashifyNET is now fully CLS-Compliant!
  • Eliminated use of BitConverter, now every implementation relies on the utility class Endianness for conversions, making the library 100% platform-independent.
  • Added RapidHash support with Original, Micro, and Nano modes.
  • Added xxHash3 and xxHash3_128 support through System.IO.Hashes. You do not have to reference this library as it will be handled by HashifyNET automatically.
  • Added HashComparer API for using fixed time equality where required. HashValue (and IHashValue) automatically uses this in the background for all quality checks.
  • Fixed 2 critical bugs in BlockTransformerBase that you can find the details of in the commits for that file.
  • HashValue now holds an immutable result that can never change. You can 100% trust a HashValue instance to behave the same for its entire existence in the memory.
  • HashValue no longer coerces results automatically. Instead, we pushed this as a utility and used it in specific hash implementations where it was mandatory. HashValue enforces the given result to be equal to the given bit length in terms of bytes; otherwise, it now throws an exception rather than coercing the array. This enforces correctness since all implementations must return a buffer containing bytes in the expected bit range. If you want to coerce the array manually, you can do so through result.Coerce(desired_bit_length);.
  • Added a universal test that runs for every single hash algorithm HashifyNET supports with known expectations, such as computing identical inputs having to result in the same hash for the same algorithm. Every single hash algorithm goes through 1000+ computations in this test, and currently, all of them pass this.
  • Encoded hash values no longer return the encoded hash directly in the Hash property. Instead, you have to cast the IHashValue interface instance to an EncodedHashValue class instance, then access its EncodedHash property.
  • Added AsByteArray method to IHashValue to get the hash value as a byte array since now it returns an immutable array. This is what you must use if your implementation does not support using immutable arrays.
  • Added AsBigInteger method to IHashValue.
  • Added AsGuid method to IHashValue.
  • Added AsInt32 method to IHashValue.
  • Added AsInt64 method to IHashValue.
  • Added AsInt16 method to IHashValue.
  • Added AsChar method to IHashValue.
  • Added AsSingle method to IHashValue.
  • Added AsDouble method to IHashValue.
  • Added AsDecimal method to IHashValue.
  • Added AsDateTime method to IHashValue.
  • Added AsDateTimeOffset method to IHashValue.
  • Added AsTimeSpan method to IHashValue.
  • Added AsBinaryString method to IHashValue.
  • Added AsBase85 method to IHashValue.
  • Added AsBase58 method to IHashValue.
  • Added AsBase32 method to IHashValue.
  • Renamed GetAllAvailableHashAlgorithms to GetHashAlgorithms with HashFunctionType enum. You can pick Cryptographic, Noncryptographic, or both from the enum to get all of the desired algorithms in the resulting array.
  • Added GetHashFunctions that does a similar job to GetHashAlgorithms, but instead it returns an instance of the algorithms you picked with HashFunctionType.

Non-CLS Compliant features

The features below are only available to C#:

  • Added AsUInt16 method to HashValue.
  • Added AsUInt32 method to HashValue.
  • Added AsUInt64 method to HashValue.

Full change log

For the full list of changes, please check our change log.

Click here for the latest available NuGet package.

Clone this wiki locally