mjfh / nim-jhash

Jenkins Hasher producing 32 bit digests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Jenkins Hasher producing 32 bit digests

License:Other


Languages

Language:Nim 83.8%Language:Makefile 8.8%Language:HTML 4.8%Language:Perl 2.7%