budul.HashExtensions
2.0.0
dotnet add package budul.HashExtensions --version 2.0.0
NuGet\Install-Package budul.HashExtensions -Version 2.0.0
<PackageReference Include="budul.HashExtensions" Version="2.0.0" />
<PackageVersion Include="budul.HashExtensions" Version="2.0.0" />
<PackageReference Include="budul.HashExtensions" />
paket add budul.HashExtensions --version 2.0.0
#r "nuget: budul.HashExtensions, 2.0.0"
#:package budul.HashExtensions@2.0.0
#addin nuget:?package=budul.HashExtensions&version=2.0.0
#tool nuget:?package=budul.HashExtensions&version=2.0.0
HashExtensions
HashExtensions is a C# library providing advanced, flexible, and efficient hashing utilities for sequences, collections, and strings. It is designed for .NET Standard 2.1 and .NET 6/7/8, making it compatible with a wide range of modern .NET applications.
Features
- Sequence Hashing: Compute hashes for sequences, collections, or arrays, with support for:
- Order-sensitive, order-insensitive, and direction-insensitive hashing
- Hashing based on specific properties or multiple properties
- Static Hash Generation: Generate fixed-length numeric or alphanumeric hashes from strings or collections of strings
- Customizable Hash Length: Control the length of generated hashes (1�12 digits/characters)
- Optimized Performance: Uses precomputed values and efficient algorithms for fast hash calculation
Installation
Add the source file to your project or build as a class library and reference it.
Usage
Sequence Hashing
using HashExtensions;
// Hash a sequence of objects
int hash = Extensions.GetSequenceHash(item1, item2, item3);
// Hash a collection with a property selector
int hash = myList.GetSequenceHash(x => x.Id);
// Order-insensitive hash
int hash = myList.GetSequenceHashOrdered();
// Direction-insensitive hash
int hash = myList.GetSequenceHashDirected();
Static Hash Generation
using HashExtensions;
// Numeric hash from strings
ulong numHash = Extensions.GetStaticHashNumber("foo", "bar");
// Alphanumeric hash from strings
string textHash = Extensions.GetStaticHashText("foo", "bar");
// Control hash length (1�12)
ulong shortHash = "example".GetStaticHashNumber(length: 6);
string shortTextHash = "example".GetStaticHashText(length: 8);
API Reference
See HashExtensions/Extensions.cs for full documentation and XML comments.
Target Frameworks
- .NET Standard 2.1
- .NET 6
- .NET 7
- .NET 8
License
See LICENSE for details.
Contributing
Contributions, issues, and feature requests are welcome!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on budul.HashExtensions:
Package | Downloads |
---|---|
budul.EnumerableExtensions
Multiple extension methods to determine, manipulate and adjust enumerable data |
GitHub repositories
This package is not used by any popular GitHub repositories.