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