Session/ID/md5.pm

filter: Statementstmt 81.2% 13 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 76.1% 16 / 21 SCAR 0.1
CC
1
Cov
81%
generate_id
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Session/Serialize/storable.pm ↑ Summary Session/Tutorial.pm »
1 package CGI::Session::ID::md5;
2  
3 # $Id: md5.pm 216 2005-09-01 10:52:26Z sherzodr $
4  
5 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Digest::MD5;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use CGI::Session::ErrorHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 12 $CGI::Session::ID::md5::VERSION = '1.4';
10 12 @CGI::Session::ID::md5::ISA = qw( CGI::Session::ErrorHandler );
11  
12 12 *generate = \&generate_id;
13 sub generate_id {
14 0 ▶ my $md5 = new Digest::MD5();
Subroutine generate_id: not called CC=1 SCAR=6.9
Pod undocumented
15 0 $md5->add($$ , time() , rand(time) );
16 0 return $md5->hexdigest();
17 }
18  
19  
20 12 1;
21  
22 =pod
23  
24 =head1 NAME
25  
26 CGI::Session::ID::md5 - default CGI::Session ID generator
27  
28 =head1 SYNOPSIS
29  
30 use CGI::Session;
31 $s = new CGI::Session("id:md5", undef);
32  
33 =head1 DESCRIPTION
34  
35 CGI::Session::ID::MD5 is to generate MD5 encoded hexadecimal random ids. The library does not require any arguments.
36  
37 =head1 LICENSING
38  
39 For support and licensing see L<CGI::Session|CGI::Session>
40  
41 =cut
« Session/Serialize/storable.pm ↑ Summary Session/Tutorial.pm »