All Projects → wilhelmliao → xxHash.NET

wilhelmliao / xxHash.NET

Licence: other
xxHash for .NET

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to xxHash.NET

xxhash-rust
Rust implementation of xxhash
Stars: ✭ 56 (+115.38%)
Mutual labels:  xxhash
basic-transport-info-app
A progressive web app to show direct & indirect buses / transport between two places / cities / stops .Show next schedule & travel duration. Algorithm to calculate indirect buses on basis of their schedule time. Voice search . Locate nearest city/stop by gps. Bus timetable.
Stars: ✭ 12 (-53.85%)
Mutual labels:  hashing-algorithm
Hashr
A simple and functional Android app for calculating checksums
Stars: ✭ 16 (-38.46%)
Mutual labels:  hashing-algorithm
xxhashdir
⚡Fast filysystem fingerprinting using xxHash
Stars: ✭ 47 (+80.77%)
Mutual labels:  xxhash
komihash
Very fast, high-quality hash function (non-cryptographic, C) + PRNG
Stars: ✭ 68 (+161.54%)
Mutual labels:  hashing-algorithm
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+1369.23%)
Mutual labels:  xxhash
ngx http hmac secure link module
HMAC Secure Link module for NGINX.
Stars: ✭ 47 (+80.77%)
Mutual labels:  hashing-algorithm
HashDepot
.NET library for xxHash, FNV, MurmurHash3 and SipHash algorithms
Stars: ✭ 107 (+311.54%)
Mutual labels:  xxhash
hash-checker
Fast and simple application that allows you to generate and compare hashes from files and text
Stars: ✭ 72 (+176.92%)
Mutual labels:  hashing-algorithm
cross-modal-hasing-playground
Python implementation of cross-modal hashing algorithms
Stars: ✭ 19 (-26.92%)
Mutual labels:  hashing-algorithm
XXHash
XXHash - Extremely fast hash algorithm,impl for csharp,can process 11.8 GB/s on modern cpu. impl with net core 2.0 and .net
Stars: ✭ 24 (-7.69%)
Mutual labels:  xxhash
murmurhash-php
PHP userland implementation of MurmurHash3
Stars: ✭ 121 (+365.38%)
Mutual labels:  hashing-algorithm
prvhash
PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor. (Codename Gradilac/Градилак)
Stars: ✭ 194 (+646.15%)
Mutual labels:  hashing-algorithm
xxHash-Swift
xxHash framework in Swift.
Stars: ✭ 22 (-15.38%)
Mutual labels:  xxhash
vtl
Fake videos detection by tracing the source using video hashing retrieval.
Stars: ✭ 57 (+119.23%)
Mutual labels:  hashing-algorithm
Scrypt
A .NET implementation of scrypt password hash algorithm.
Stars: ✭ 90 (+246.15%)
Mutual labels:  hashing-algorithm
Xxhash
Extremely fast non-cryptographic hash algorithm
Stars: ✭ 5,783 (+22142.31%)
Mutual labels:  xxhash
dups
A CLI tool to find/remove duplicate files supporting multi-core and different algorithms (MD5, SHA256, and XXHash).
Stars: ✭ 21 (-19.23%)
Mutual labels:  xxhash

xxHash.NET

  • Build Status .NET Framework v4.0:NuGet version .NET core 2.0:NuGet version

A .NET implementation of xxHash.

Synopsis

Demo

.NET Fiddle(https://dotnetfiddle.net/dbgN2y)

xxHash API approach

The following snippet demonstrates computing the XXH32 hash value of the input string "test".

byte[] input = Encoding.ASCII.GetBytes("test");     // the data to be hashed
uint result = XXHash.XXH32(input);                  // compute the XXH32 hash value. => '1042293711'
                                                    // NOTE:
                                                    //   you can specified seed as the second parameter.

The following snippet computes the XXH32 hash value of the input file "test.doc".

Stream stream = File.OpenRead(@"C:\test.doc");      // the data to be hashed
XXHash.State32 state = XXHash.CreateState32();      // create and initialize a xxH states instance.
                                                    // NOTE:
                                                    //   xxHash require a xxH state object for keeping
                                                    //   data, seed, and vectors.
                                                    
XXHash.UpdateState32(state, stream);                // puts the file stream into specified xxH state.

uint result = XXHash.DigestState32(state);          // compute the XXH32 hash value.
Supported xxHash APIs:
original xxHash API name XXH32 XXH64
XXHnn() XXHash.XXH32() XXHash.XXH64()
XXHnn_state_t XXHash.State32 XXHash.State64
XXHnn_createState() XXHash.CreateState32() XXHash.CreateState64()
XXHnn_freeState() Not implemented Not implemented
XXHnn_reset() XXHash.ResetState32() XXHash.ResetState64()
XXHnn_update() XXHash.UpdateState32() XXHash.UpdateState64()
XXHnn_digest() XXHash.DigestState32() XXHash.DigestState64()

HashAlgorithm approach

In addition, the assembly also provides XXHash32 and XXHash64 the two implementation classes of System.Security.Cryptography.HashAlgorithm.

The following snippets demonstrate computing the XXH32 hash value with HashAlgorithm approach.

byte[] input = Encoding.ASCII.GetBytes("test");        // the data to be hashed.
using (HashAlgorithm xxhash = XXHash32.Create())
{
  byte[] result = xxhash.ComputeHash(input);           // compute the hash.
}

-- or --

byte[] input = Encoding.ASCII.GetBytes("test");        // the data to be hashed
using (HashAlgorithm xxhash = XXHash32.Create())
{
  xxhash.TransformFinalBlock(input, 0, input.Length);
  byte[] result = xxhash.Hash;                         // retrieves the hash value.
}

NOTE: XXH64 is also supported: you can use xxHash64 class instead of xxHash32.

Versioning


Copyright

Copyright (c) 2015 Wilhelm Liao. See LICENSE for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].