Skip to content
Xen edited this page Oct 1, 2025 · 2 revisions

HotFix/Minor Release

This release solves multiple bugs and adds a few more helper methods that come in handy in certain situations. Here's a brief list:

  • Added IHashConfigBase to IHashFunctionBase. Previously, no config was accessible through the base class; you'd somehow had to guess the generic type to access its config. This eliminates that need, and you can now directly use Config through the IHashConfigBase.
  • Updated IHashValue_Extensions to use IHashFunctionBase over IHashFunction<CName>, making all the extensions available to the base interface.
  • Fixed primitive conversions not respecting the value's endianness. For example, AsInt64 was always creating a 64-bit integer in little-endian order, but now they use the Endianness of the hash value.
  • Fixed helper methods not respecting the instance type of the IHashValue. For example, if you called AsLittleEndian from an instance created by EncodedHashValue, it would still return the new instance as HashValue. This now follows a specific path and allows subclasses to have their own instance creations, which are then used by all the helper methods in the HashValue.
  • Fixed primitive conversions trying to convert non-endian-applicable values to integers; this now throws an exception. You must convert the value to either Big Endian or Little Endian before trying to get a primitive type of it.
  • Added TreatAsBigEndian helper method to IHashValue that basically changes the Endianness to Big Endian but does not touch the value itself. For example, if you got a 512-bit hash value that has no endianness, you can first Slice its first 8 bytes, then call TreatAsBigEndian and use AsInt64 afterward, it should work as expected with no errors or failures!
  • Added TreatAsLittleEndian, the opposite of TreatAsBigEndian, with the same behaviour but for creating Little Endian values.
  • HashComparer now supports ReadOnlySpan<byte> as inputs; you no longer need a separate fixed time equalizer for this.
  • Fixed some misleading comments in IHashValue.

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

Enjoy!

Click here for the latest available NuGet package.

Clone this wiki locally