jhash

Jenkins Hasher producing 32 bit digests


Need help? Read Nimble

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

Author: mjfh

Licence: UNLICENSE

Project website

Docs