ClearPress
view release on metacpan or search on metacpan
'POSIX' => '1.09',
'Readonly' => '1.03',
'XML::Simple' => '2.18',
'HTML::Entities' => '1.35',
'HTTP::Server::Simple' => '0.44',
'HTTP::ClientDetect::Language' => '0.03',
'base' => '2.13',
'strict' => '1.03',
'warnings' => '1.05',
'YAML::Tiny' => '1.36',
'Crypt::CBC' => '2.30',
'Crypt::Blowfish' => '2.10',
'MIME::Base64' => '3.07',
},
recommends => {
'Crypt::MySQL' => '0.04',
'DBD::SQLite' => '1.14',
'DBD::mysql' => '4.007',
'Digest::MD5' => '2.39',
'Digest::SHA' => '5.47',
'Net::LDAP' => '0.39',
"Digest::MD5" : "2.39",
"Digest::SHA" : "5.47",
"Net::LDAP" : "0.39"
},
"requires" : {
"CGI" : "3.20",
"Carp" : "1.02",
"Class::Accessor" : "0.31",
"Config::IniFiles" : "2.38",
"Crypt::Blowfish" : "2.10",
"Crypt::CBC" : "2.30",
"DBI" : "1.51",
"Data::UUID" : "1.220",
"English" : "1.01",
"HTML::Entities" : "1.35",
"HTTP::ClientDetect::Language" : "0.03",
"HTTP::Server::Simple" : "0.44",
"IO::Capture" : "0.05",
"IO::Scalar" : "2.110",
"Lingua::EN::Inflect" : "1.89",
"Lingua::EN::PluralToSingular" : "0.17",
DBD::mysql: '4.007'
Digest::MD5: '2.39'
Digest::SHA: '5.47'
Net::LDAP: '0.39'
requires:
CGI: '3.20'
Carp: '1.02'
Class::Accessor: '0.31'
Config::IniFiles: '2.38'
Crypt::Blowfish: '2.10'
Crypt::CBC: '2.30'
DBI: '1.51'
Data::UUID: '1.220'
English: '1.01'
HTML::Entities: '1.35'
HTTP::ClientDetect::Language: '0.03'
HTTP::Server::Simple: '0.44'
IO::Capture: '0.05'
IO::Scalar: '2.110'
Lingua::EN::Inflect: '1.89'
Lingua::EN::PluralToSingular: '0.17'
lib/ClearPress/authenticator/session.pm view on Meta::CPAN
# -*- mode: cperl; tab-width: 8; indent-tabs-mode: nil; basic-offset: 2 -*-
# vim:ts=8:sw=2:et:sta:sts=2
#########
# Author: rmp
#
package ClearPress::authenticator::session;
use strict;
use warnings;
use Crypt::CBC;
use base qw(ClearPress::authenticator);
use Readonly;
use Carp;
use MIME::Base64 qw(encode_base64 decode_base64);
use YAML::Tiny qw(Load Dump);
our $VERSION = q[477.1.4];
Readonly::Scalar our $KEY => q[topsecretkey];
lib/ClearPress/authenticator/session.pm view on Meta::CPAN
return $self->{key};
}
return $KEY;
}
sub cipher {
my $self = shift;
if(!$self->{cipher}) {
$self->{cipher} = Crypt::CBC->new(
-cipher => 'Blowfish',
-key => $self->key,
);
}
return $self->{cipher};
}
1;
__END__
lib/ClearPress/authenticator/session.pm view on Meta::CPAN
my $sEncoded = $oSession->encode_token($hrUserData);
=head2 decode_token - decode and decrypt a token
my $hrUserData = $oSession->decode_token($sEncoded);
=head2 key - get/set accessor for cipher key (optionally configured during construction)
my $sKey = $oSession->key();
=head2 cipher - a configure Crypt::CBC object
my $oCipher = $oSession->cipher();
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPENDENCIES
=over
=item strict
=item warnings
=item Crypt::CBC
=item base
=item ClearPress::authenticator
=item Readonly
=item Carp
=item MIME::Base64
t/authenticator/session.t view on Meta::CPAN
can_ok($PKG, qw(authen_token));
{
my $auth = $PKG->new();
isa_ok($auth, $PKG);
}
{
my $auth = $PKG->new();
my $cipher = $auth->cipher();
isa_ok($cipher, 'Crypt::CBC');
is($cipher, $auth->cipher(), 'primed cache cipher');
}
{
my $auth = $PKG->new();
my $key = $auth->key();
is($key, 'topsecretkey', 'default key');
}
( run in 0.634 second using v1.01-cache-2.11-cpan-e1769b4cff6 )