line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Session::SHA; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
277
|
use parent 'Data::Session::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
59
|
no autovivification; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
44
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
314
|
use Digest::SHA; |
|
1
|
|
|
|
|
2502
|
|
|
1
|
|
|
|
|
74
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
8
|
use Hash::FieldHash ':all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
249
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $errstr = ''; |
13
|
|
|
|
|
|
|
our $VERSION = '1.17'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ----------------------------------------------- |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub generate |
18
|
|
|
|
|
|
|
{ |
19
|
45
|
|
|
45
|
0
|
94
|
my($self, $bits) = @_; |
20
|
|
|
|
|
|
|
|
21
|
45
|
|
|
|
|
216
|
return Digest::SHA -> new($bits) -> add($$, time, rand(time) ) -> hexdigest; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} # End of generate. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# ----------------------------------------------- |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
0
|
|
my($class, %arg) = @_; |
30
|
0
|
|
0
|
|
|
|
$arg{verbose} ||= 0; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return from_hash(bless({}, $class), \%arg); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} # End of new. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# ----------------------------------------------- |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
L - A persistent session manager |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 Synopsis |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
See L for details. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 Description |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L is the parent of all L modules. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 Case-sensitive Options |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
See L for important information. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 Support |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Log a bug on RT: L. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 Author |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
L was written by Ron Savage Iron@savage.net.auE> in 2010. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Home page: L. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 Copyright |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Australian copyright (c) 2010, Ron Savage. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
All Programs of mine are 'OSI Certified Open Source Software'; |
73
|
|
|
|
|
|
|
you can redistribute them and/or modify them under the terms of |
74
|
|
|
|
|
|
|
The Artistic License, a copy of which is available at: |
75
|
|
|
|
|
|
|
http://www.opensource.org/licenses/index.html |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |