.\" -*- 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 "SessionX::Generate::MD5 3pm" .TH SessionX::Generate::MD5 3pm 2024-03-04 "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 Apache::Session::Generate::MD5 \- Use MD5 to create random object IDs .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Apache::SessionX::Generate::MD5; \& \& $id = Apache::SessionX::Generate::MD5::generate($string); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module fulfills the ID generation interface of Apache::SessionX. If you don't give the argument \f(CW$string\fR, the IDs are generated using a two-round MD5 of a random number, the time since the epoch, the process ID, and the address of an anonymous hash. The resultant ID number is highly entropic on Linux and other platforms that have good random number generators. You are encouraged to investigate the quality of your system's random number generator if you are using the generated ID numbers in a secure environment. If you give \f(CW$string\fR the ID is the MD5 hash of that string. .PP This module can also examine session IDs to ensure that they are, indeed, session ID numbers and not evil attacks. The reader is encouraged to consider the effect of bogus session ID numbers in a system which uses these ID numbers to access disks and databases. .PP This modules takes one argument in the usual Apache::Session style. The argument is IDLength, and the value, between 0 and 32, tells this module where to truncate the session ID. Without this argument, the session ID will be 32 hexadecimal characters long, equivalent to a 128\-bit key. .SH AUTHOR .IX Header "AUTHOR" This module was written by Jeffrey William Baker and modified by Gerald Richter . .SH "SEE ALSO" .IX Header "SEE ALSO" Apache::Session