A pure C# implementation of xxhash
- From Nuget
-
Download from Nuget
-
Also, run the following command in the Package Manager Console.
PM > Install-Package xxHashSharp
- From Source
- You can just clone this repo.
byte[] input = Encoding.UTF8.GetBytes("hello world");
xxHash hash = new xxHash();
hash.Init();
hash.Update(input, input.Count());
...
Console.WriteLine("{0:X}", hash.Digest());
or
byte[] input = Encoding.UTF8.GetBytes("hello world");
Console.WriteLine("{0:X}", xxHash.CalculateHash(input));
BSD 2-clause license.