Filename | /usr/share/perl5/CGI/Session/ID/md5.pm |
Statements | Executed 0 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 16µs | 24µs | BEGIN@5 | CGI::Session::ID::md5::
1 | 1 | 1 | 14µs | 33µs | BEGIN@6 | CGI::Session::ID::md5::
1 | 1 | 1 | 5µs | 5µs | BEGIN@7 | CGI::Session::ID::md5::
0 | 0 | 0 | 0s | 0s | generate_id | CGI::Session::ID::md5::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package CGI::Session::ID::md5; | ||||
2 | |||||
3 | # $Id$ | ||||
4 | |||||
5 | 2 | 32µs | # spent 24µs (16+7) within CGI::Session::ID::md5::BEGIN@5 which was called:
# once (16µs+7µs) by CGI::Session::_load_pluggables at line 5 # spent 24µs making 1 call to CGI::Session::ID::md5::BEGIN@5
# spent 8µs making 1 call to strict::import | ||
6 | 2 | 52µs | # spent 33µs (14+19) within CGI::Session::ID::md5::BEGIN@6 which was called:
# once (14µs+19µs) by CGI::Session::_load_pluggables at line 6 # spent 33µs making 1 call to CGI::Session::ID::md5::BEGIN@6
# spent 19µs making 1 call to Exporter::import | ||
7 | 1 | 5µs | # spent 5µs within CGI::Session::ID::md5::BEGIN@7 which was called:
# once (5µs+0s) by CGI::Session::_load_pluggables at line 7 # spent 5µs making 1 call to CGI::Session::ID::md5::BEGIN@7 | ||
8 | |||||
9 | $CGI::Session::ID::md5::VERSION = '4.43'; | ||||
10 | @CGI::Session::ID::md5::ISA = qw( CGI::Session::ErrorHandler ); | ||||
11 | |||||
12 | *generate = \&generate_id; | ||||
13 | sub generate_id { | ||||
14 | my $md5 = Digest::MD5->new(); | ||||
15 | $md5->add($$ , time() , rand(time) ); | ||||
16 | return $md5->hexdigest(); | ||||
17 | } | ||||
18 | |||||
19 | |||||
20 | 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 = CGI::Session->new("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 |