.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Digest::JHash 3pm" .TH Digest::JHash 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Digest::JHash \- Perl extension for 32 bit Jenkins Hashing Algorithm .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Digest::JHash qw(jhash); \& \& $digest = jhash($data); \& \& # note that calling jhash() directly like this is the fastest way: \& \& $digest = Digest::JHash::jhash($data); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`Digest::JHash\*(C'\fR module allows you to use the fast JHash hashing algorithm developed by Bob Jenkins from within Perl programs. The algorithm takes as input a message of arbitrary length and produces as output a 32\-bit "message digest" of the input in the form of an unsigned long integer. .PP Call it a low calorie version of MD5 if you like. .PP See http://burtleburtle.net/bob/hash/doobs.html for more information. .SH FUNCTIONS .IX Header "FUNCTIONS" .IP jhash($data) 4 .IX Item "jhash($data)" This function will calculate the JHash digest of the "message" in \f(CW$data\fR and return a 32 bit integer result (an unsigned long in the C) .SH EXPORTS .IX Header "EXPORTS" None by default but you can have the \fBjhash()\fR function if you ask nicely. See below for reasons not to use Exporter (it is slower than a direct call) .SH "SPEED NOTE" .IX Header "SPEED NOTE" If speed is a major issue it is roughly twice as fast to do call the \fBjhash()\fR function like Digest::JHash::jhash('message') than it is to import the \&\fBjhash()\fR method using Exporter so you can call it as simply jhash('message'). There is a short script that demonstrates the speed of different calling methods (direct, OO and Imported) in examples/oo_vs_func.pl .SH AUTHORS .IX Header "AUTHORS" The JHash implementation was written by Bob Jenkins . .PP This perl extension was written by Andrew Towers . .PP A few mods were added by James Freeman ). .SH "SEE ALSO" .IX Header "SEE ALSO" http://burtleburtle.net/bob/hash/doobs.html .SH LICENSE .IX Header "LICENSE" This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the terms of the Artistic License 2.0. A copy is include in this distribution.