jhash

Jenkins Hasher producing 32 bit digests

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License UNLICENSE
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:23

Tags

Installation

nimble install jhash
choosenim install jhash
git clone https://github.com/mjfh/nim-jhash.git

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
jhash - - - - - - -

Source

Repository https://github.com/mjfh/nim-jhash.git
Homepage https://mjfh.github.io/nim-jhash/
Registry Source nimble_official

README

Jenkins Hasher

This hasher is handy for producing 32 bit identifiers.

For impementation details and reasoning see the Jenkins Hasher article in the Dr. Doobs magazine.

The current implementation is taken from the Perl Digest::JHash xs code and tested against this module (see Digest::JHash(3pm) POSIX manual.)

Example

   import
     jhash

   var blurb =
     "How much wood could a woodchuck chuck. "   &
     "If a woodchuck could chuck wood? "         &
     "As much wood as a woodchuck could chuck, " &
     "If a woodchuck could chuck wood."

   doAssert blurb.jHash == 0x61010c8u32