diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-14 18:33:19 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-14 18:33:19 +0100 |
commit | ff7b9de82908baf1d5f9af71e35dad2369bfdc2f (patch) | |
tree | 1f9821bf2323786cbe68b4d3b0964ca449332766 /qooxdoo/source/perl/CGI/Session/ID/md5.pm | |
parent | d546419d19b89633f8ac3c461eb900f4c4f29b90 (diff) | |
download | smokeping-ff7b9de82908baf1d5f9af71e35dad2369bfdc2f.tar.gz smokeping-ff7b9de82908baf1d5f9af71e35dad2369bfdc2f.tar.xz |
initial qooxdoo drop for smokeping
Diffstat (limited to 'qooxdoo/source/perl/CGI/Session/ID/md5.pm')
-rw-r--r-- | qooxdoo/source/perl/CGI/Session/ID/md5.pm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/qooxdoo/source/perl/CGI/Session/ID/md5.pm b/qooxdoo/source/perl/CGI/Session/ID/md5.pm new file mode 100644 index 0000000..82864e0 --- /dev/null +++ b/qooxdoo/source/perl/CGI/Session/ID/md5.pm @@ -0,0 +1,41 @@ +package CGI::Session::ID::md5; + +# $Id: md5.pm 351 2006-11-24 14:16:50Z markstos $ + +use strict; +use Digest::MD5; +use CGI::Session::ErrorHandler; + +$CGI::Session::ID::md5::VERSION = '4.20'; +@CGI::Session::ID::md5::ISA = qw( CGI::Session::ErrorHandler ); + +*generate = \&generate_id; +sub generate_id { + my $md5 = new Digest::MD5(); + $md5->add($$ , time() , rand(time) ); + return $md5->hexdigest(); +} + + +1; + +=pod + +=head1 NAME + +CGI::Session::ID::md5 - default CGI::Session ID generator + +=head1 SYNOPSIS + + use CGI::Session; + $s = new CGI::Session("id:md5", undef); + +=head1 DESCRIPTION + +CGI::Session::ID::MD5 is to generate MD5 encoded hexadecimal random ids. The library does not require any arguments. + +=head1 LICENSING + +For support and licensing see L<CGI::Session|CGI::Session> + +=cut |