Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 740 Bytes

README.md

File metadata and controls

44 lines (28 loc) · 740 Bytes

xxHashSharp

A pure C# implementation of xxhash

Installation

  1. From Nuget
  • Download from Nuget

  • Also, run the following command in the Package Manager Console.

    PM > Install-Package xxHashSharp
    
  1. From Source
  • You can just clone this repo.

Example

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));

License

BSD 2-clause license.