No description
Find a file
2021-01-19 09:23:01 +00:00
docs fix wording 2021-01-19 09:23:01 +00:00
src fix wording 2021-01-19 09:23:01 +00:00
tests update source path 2021-01-18 19:35:11 +00:00
.gitignore initial 2021-01-18 17:00:41 +00:00
_config.yml Set theme jekyll-theme-cayman 2021-01-18 17:17:39 +00:00
index.html update source path 2021-01-18 19:35:11 +00:00
jhash.nimble update source path 2021-01-18 19:35:11 +00:00
LICENSE initial 2021-01-18 17:00:41 +00:00
makefile update source path 2021-01-18 19:35:11 +00:00
README.md update source path 2021-01-18 19:35:11 +00:00
UNLICENSE initial 2021-01-18 17:00:41 +00:00

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