ChibiHash

Haskell port of ChibiHash, a simple and fast 64-bit hash function. Features: Fast 64-bit hashing Suitable for hash tables and hash-based data structures Supports both V1 and V2 implementations For more information, see the article "ChibiHash: A small, fast 64-bit hash function" at https://nrk.neocities.org/articles/chibihash


Keywords
data, library, mit, program, Propose Tags, Report a vulnerability, https://nrk.neocities.org/articles/chibihash, Skip to Readme, Index, Quick Jump, ChibiHash, ChibiHash.V1, ChibiHash.V2, ChibiHash-0.2.0.0.tar.gz, browse, Package description, revised, metadata revisions, Package maintainers, thevilledev, edit package information , N-R-K/ChibiHash, ChibiHash: A small, fast 64-bit hash function, N-R-K, hash-functions, haskell-library
License
MIT
Install
cabal install ChibiHash-0.2.0.0

Documentation

ChibiHash-hs

Hackage Version

Haskell port of N-R-K/ChibiHash. See the article ChibiHash: A small, fast 64-bit hash function for more information.

All credit for the algorithm goes to N-R-K.

Usage

module Main (main) where

import ChibiHash (chibihash64)
import qualified Data.ByteString.Char8 as C8

main :: IO ()
main = do
    let text = "Hello, ChibiHash!"
    putStrLn $ "Input text: " ++ show text
    putStrLn $ "Hash (seed 0): " ++ show (chibihash64 (C8.pack text) 0)

You may also run the example program with cabal run.

Tests

Run tests with cabal test. Both v1 and v2 are tested.

License

MIT.