-
Notifications
You must be signed in to change notification settings - Fork 1
V5.0.0
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 classEndiannessfor 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
HashComparerAPI for using fixed time equality where required.HashValue(andIHashValue) automatically uses this in the background for all quality checks. - Fixed 2 critical bugs in
BlockTransformerBasethat you can find the details of in the commits for that file. -
HashValuenow holds an immutable result that can never change. You can 100% trust aHashValueinstance to behave the same for its entire existence in the memory. -
HashValueno longer coerces results automatically. Instead, we pushed this as a utility and used it in specific hash implementations where it was mandatory.HashValueenforces 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 throughresult.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
Hashproperty. Instead, you have to cast theIHashValueinterface instance to anEncodedHashValueclass instance, then access itsEncodedHashproperty. - Added
AsByteArraymethod toIHashValueto 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
AsBigIntegermethod toIHashValue. - Added
AsGuidmethod toIHashValue. - Added
AsInt32method toIHashValue. - Added
AsInt64method toIHashValue. - Added
AsInt16method toIHashValue. - Added
AsCharmethod toIHashValue. - Added
AsSinglemethod toIHashValue. - Added
AsDoublemethod toIHashValue. - Added
AsDecimalmethod toIHashValue. - Added
AsDateTimemethod toIHashValue. - Added
AsDateTimeOffsetmethod toIHashValue. - Added
AsTimeSpanmethod toIHashValue. - Added
AsBinaryStringmethod toIHashValue. - Added
AsBase85method toIHashValue. - Added
AsBase58method toIHashValue. - Added
AsBase32method toIHashValue. - Renamed
GetAllAvailableHashAlgorithmstoGetHashAlgorithmswithHashFunctionTypeenum. You can pick Cryptographic, Noncryptographic, or both from the enum to get all of the desired algorithms in the resulting array. - Added
GetHashFunctionsthat does a similar job toGetHashAlgorithms, but instead it returns an instance of the algorithms you picked withHashFunctionType.
The features below are only available to C#:
- Added
AsUInt16method toHashValue. - Added
AsUInt32method toHashValue. - Added
AsUInt64method toHashValue.
For the full list of changes, please check our change log.
© 2025, Deskasoft International. All rights reserved.