package CGI::Session::ID::MD5; # $Id: MD5.pm,v 1.1.1.1 2003/08/02 23:39:35 takezoe Exp $ use strict; use Digest::Perl::MD5; use vars qw($VERSION); ($VERSION) = '$Revision: 1.1.1.1 $' =~ m/Revision:\s*(\S+)/; sub generate_id { my $self = shift; my $md5 = new Digest::Perl::MD5(); $md5->add($$ , time() , rand(9999) ); return $md5->hexdigest(); } 1; =pod =head1 NAME CGI::Session::ID::MD5 - default CGI::Session ID driver =head1 SYNOPSIS use CGI::Session qw/-api3/; $session = new CGI::Session("id:MD5", undef, { Directory => '/tmp', IDFile => '/tmp/cgisession.id', IDInit => 1000, IDIncr => 2 }); =head1 DESCRIPTION CGI::Session::ID::MD5 is to generate MD5 encoded hexidecimal random ids. The library does not require any arguments. =head1 COPYRIGHT Copyright (C) 2002 Sherzod Ruzmetov. All rights reserved. This library is free software. You can modify and distribute it under the same terms as Perl itself. =head1 AUTHOR Sherzod Ruzmetov Feedbacks, suggestions and patches are welcome. =head1 SEE ALSO =over 4 =item * L - Auto Incremental ID generator =item * L - CGI::Session manual =item * L - extended CGI::Session manual =item * L - practical solutions for real life problems =item * B - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt =item * L - standard CGI library =item * L - another fine alternative to CGI::Session =back =cut