-
-
Notifications
You must be signed in to change notification settings - Fork 1
V7.1.1
Xen edited this page Oct 1, 2025
·
2 revisions
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
IHashConfigBasetoIHashFunctionBase. 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 useConfigthrough theIHashConfigBase. - Updated
IHashValue_Extensionsto useIHashFunctionBaseoverIHashFunction<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
Endiannessof the hash value. - Fixed helper methods not respecting the instance type of the
IHashValue. For example, if you calledAsLittleEndianfrom an instance created byEncodedHashValue, it would still return the new instance asHashValue. 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 theHashValue. - 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
TreatAsBigEndianhelper method toIHashValuethat basically changes theEndiannessto 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 firstSliceits first 8 bytes, then callTreatAsBigEndianand useAsInt64afterward, it should work as expected with no errors or failures! - Added
TreatAsLittleEndian, the opposite ofTreatAsBigEndian, with the same behaviour but for creating Little Endian values. -
HashComparernow supportsReadOnlySpan<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!
© 2025, Deskasoft International. All rights reserved.