view release on metacpan or search on metacpan
lib/Amazon/S3.pm view on Meta::CPAN
if ( !defined $encryption_key ) {
$encryption_key = eval {
if ( !defined $encryption_key ) {
require Crypt::Blowfish;
require Crypt::CBC;
return md5_hex( rand $PID );
}
};
return $text if $EVAL_ERROR;
}
return $text if !$encryption_key;
my $cipher = Crypt::CBC->new(
-pass => $encryption_key,
-key => $encryption_key,
-cipher => 'Crypt::Blowfish',
-nodeprecate => $TRUE,
);
lib/Amazon/S3.pm view on Meta::CPAN
my ($secret) = @_;
return $secret
if !$secret || !$encryption_key;
my $cipher = Crypt::CBC->new(
-pass => $encryption_key,
-key => $encryption_key,
-cipher => 'Crypt::Blowfish',
);
lib/Amazon/S3.pm view on Meta::CPAN
Unfortunately, while this will prevent L<Net::Amazon::Signature::V4>
from hanging on to your credentials, you credentials will be stored in
the C<Amazon::S3> object.
Starting with version 0.55 of this module, if you have installed
L<Crypt::CBC> and L<Crypt::Blowfish>, your credentials will be
encrypted using a random key created when the class is
instantiated. While this is more secure than leaving them in
plaintext, if the key is discovered (the key however is not stored in
the object's hash) and the object is dumped, your I<encrypted>
credentials can be exposed.
view all matches for this distribution
view release on metacpan or search on metacpan
factpacks/rfc_index.fact view on Meta::CPAN
rfc 2045 => Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. N. Freed & N. Borenstein. November 1996. (Format: TXT=72932 bytes) (Obsoletes RFC1521, RFC1522, RFC1590) (Updated by RFC2184, RFC2231) (Status: DRAF...
rfc 2044 => UTF-8, a transformation format of Unicode and ISO 10646. F. Yergeau. October 1996. (Format: TXT=11932 bytes) (Obsoleted by RFC2279) (Status: INFORMATIONAL)
rfc 2043 => The PPP SNA Control Protocol (SNACP). A. Fuqua. October 1996. (Format: TXT=13719 bytes) (Status: PROPOSED STANDARD)
rfc 2042 => Registering New BGP Attribute Types. B. Manning. January 1997. (Format: TXT=4001 bytes) (Status: INFORMATIONAL)
rfc 2041 => Mobile Network Tracing. B. Noble, G. Nguyen, M. Satyanarayanan, R. Katz. December 1996. (Format: TXT=64688 bytes) (Status: INFORMATIONAL)
rfc 2040 => The RC5, RC5-CBC, RC5-CBC-Pad, and RC5-CTS Algorithms. R. Baldwin, R. Rivest. October 1996. (Format: TXT=54598 bytes) (Status: INFORMATIONAL)
rfc 2039 => Applicability of Standards Track MIBs to Management of World Wide Web Servers. C. Kalbfleisch. November 1996. (Format: TXT=31966 bytes) (Status: INFORMATIONAL)
rfc 2038 => RTP Payload Format for MPEG1/MPEG2 Video. D. Hoffman, G. Fernando, V. Goyal. October 1996. (Format: TXT=23266 bytes) (Status: PROPOSED STANDARD)
rfc 2037 => Entity MIB using SMIv2. K. McCloghrie, A. Bierman. October 1996. (Format: TXT=74362 bytes) (Status: PROPOSED STANDARD)
rfc 2036 => Observations on the use of Components of the Class A Address Space within the Internet. G. Huston. October 1996. (Format: TXT=20743 bytes) (Status: INFORMATIONAL)
rfc 2035 => RTP Payload Format for JPEG-compressed Video. L. Berc, W. Fenner, R. Frederick, S. McCanne. October 1996. (Format: TXT=30079 bytes) (Status: PROPOSED STANDARD)
factpacks/rfc_index.fact view on Meta::CPAN
rfc 1834 => Whois and Network Information Lookup Service, Whois++. J. Gargano & K. Weiss. August 1995. (Format: TXT=14429 bytes) (Status: INFORMATIONAL)
rfc 1833 => Binding Protocols for ONC RPC Version 2. R. Srinivasan. August 1995. (Format: TXT=24449 bytes) (Status: PROPOSED STANDARD)
rfc 1832 => XDR: External Data Representation Standard. R. Srinivasan. August 1995. (Format: TXT=47418 bytes) (Status: PROPOSED STANDARD)
rfc 1831 => RPC: Remote Procedure Call Protocol Specification Version 2. R. Srinivasan. August 1995. (Format: TXT=37798 bytes) (Status: PROPOSED STANDARD)
rfc 1830 => SMTP Service Extensions for Transmission of Large and Binary MIME Messages. G. Vaudreuil. August 1995. (Format: TXT=16555 bytes) (Status: EXPERIMENTAL)
rfc 1829 => The ESP DES-CBC Transform. P. Karn, P. Metzger & W. Simpson. August 1995. (Format: TXT=19291 bytes) (Status: PROPOSED STANDARD)
rfc 1828 => IP Authentication using Keyed MD5. P. Metzger & W. Simpson. August 1995. (Format: TXT=9800 bytes) (Status: PROPOSED STANDARD)
rfc 1827 => IP Encapsulating Security Payload (ESP). R. Atkinson. August 1995. (Format: TXT=30278 bytes) (Status: PROPOSED STANDARD)
rfc 1826 => IP Authentication Header. R. Atkinson. August 1995. (Format: TXT=27583 bytes) (Status: PROPOSED STANDARD)
rfc 1825 => Security Architecture for the Internet Protocol. R. Atkinson. August 1995. (Format: TXT=56772 bytes) (Status: PROPOSED STANDARD)
rfc 1824 => The Exponential Security System TESS: An Identity-Based Cryptographic Protocol for Authenticated Key-Exchange (E.I.S.S.-Report 1995/4). H. Danisch. August 1995. (Format: TXT=45540 bytes) (Status: INFORMATIONAL)
view all matches for this distribution
view release on metacpan or search on metacpan
- Replace random_string implementation with Crypt::SysRandom
- Bump minimum Perl version to 5.14 (IO::Socket::IP requires 5.14+)
- Remove bundled JS libraries (jQuery, Bootstrap, etc.) from setup script
- Rewrite XSRFTokenJS to vanilla JavaScript (no jQuery dependency)
- Replace Bootstrap markup in templates with semantic HTML
- Fix Crypt::CBC deprecation warning by specifying pbkdf => 'pbkdf2'
6.16 2022-11-01T19:17:29Z
- Drop ES5Shim in amon2-setup.pl
- Upgrade jQuery from 3.5.0 to 3.6.1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MSN/Protocol.pm view on Meta::CPAN
use AnyEvent;
use MIME::Base64 qw[];
use Digest::HMAC qw[hmac];
use Digest::SHA qw[];
use Digest::MD5 qw[];
use Crypt::CBC qw[];
sub anyevent_read_type {
my ($handle, $s) = @_;
sub {
return if !length $handle->{rbuf};
lib/AnyEvent/MSN/Protocol.pm view on Meta::CPAN
# 4. Pad nonce with 8 bytes of \08
my $p_nonce = $nonce . (chr(8) x 8);
# 5. Create 8 bytes of random data as iv
$iv //= Crypt::CBC->random_bytes(8);
# 6. TripleDES CBC encryption
my $encrypted_data =
Crypt::CBC->new(-literal_key => 1,
-key => $key3,
-iv => $iv,
-header => 'none',
-cipher => 'Crypt::DES_EDE3'
)->encrypt($p_nonce);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AppSamurai.pm view on Meta::CPAN
Base64 allows for storage in file, database, etc without worrying about binary
data issues. In addition, this module allows for safer storage of data on
disk, requiring both the local server key and the secret session key from the
user before unlocking the data.
L<Crypt::CBC|Crypt::CBC> is used with a support block cipher module to perform
encryption/decryption. (See the next section for information on
configuring a cipher.)
As this is tied closely into the current Apache::AppSamurai code, please do not
use an alternate serializer without first reviewing the related code.
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookieDBI.pm view on Meta::CPAN
use Apache::Constants;
use Apache::File;
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
use base qw( Apache::AuthCookie );
my $EMPTY_STRING = q{};
#===============================================================================
AuthCookieDBI.pm view on Meta::CPAN
# P A C K A G E G L O B A L S
#===============================================================================
use vars qw( %CIPHERS );
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
use vars qw( %SECRET_KEYS );
# Stores secret keys for MD5 checksums and encryption for each auth realm in
AuthCookieDBI.pm view on Meta::CPAN
=cut
$c{DBI_encryptiontype} = _dir_config_var( $r, 'DBI_EncryptionType' )
|| 'none';
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{DBI_encryptiontype} ne 'none' ) {
require Crypt::CBC;
}
=item C<WhatEverDBI_SessionLifetime>
How long tickets are good for after being issued. Note that presently
AuthCookieDBI.pm view on Meta::CPAN
my $encrypted_session_key;
if ( $c{DBI_encryptiontype} eq 'none' ) {
$encrypted_session_key = $session_key;
}
elsif ( lc $c{DBI_encryptiontype} eq 'des' ) {
$CIPHERS{"des:$auth_name"} ||= Crypt::CBC->new( $secret_key, 'DES' );
$encrypted_session_key =
$CIPHERS{"des:$auth_name"}->encrypt_hex($session_key);
}
elsif ( lc $c{DBI_encryptiontype} eq 'idea' ) {
$CIPHERS{"idea:$auth_name"} ||= Crypt::CBC->new( $secret_key, 'IDEA' );
$encrypted_session_key =
$CIPHERS{"idea:$auth_name"}->encrypt_hex($session_key);
}
elsif ( lc $c{DBI_encryptiontype} eq 'blowfish' ) {
$CIPHERS{"blowfish:$auth_name"} ||=
Crypt::CBC->new( $secret_key, 'Blowfish' );
$encrypted_session_key =
$CIPHERS{"blowfish:$auth_name"}->encrypt_hex($session_key);
}
return $encrypted_session_key;
AuthCookieDBI.pm view on Meta::CPAN
# Get the cipher from the cache, or create a new one if the
# cached cipher hasn't been created, & decrypt the session key.
my $cipher;
if ( lc $c{DBI_encryptiontype} eq 'des' ) {
$cipher = $CIPHERS{"des:$auth_name"} ||=
Crypt::CBC->new( $secret_key, 'DES' );
}
elsif ( lc $c{DBI_encryptiontype} eq 'idea' ) {
$cipher = $CIPHERS{"idea:$auth_name"} ||=
Crypt::CBC->new( $secret_key, 'IDEA' );
}
elsif ( lc $c{DBI_encryptiontype} eq 'blowfish' ) {
$cipher = $CIPHERS{"blowfish:$auth_name"} ||=
Crypt::CBC->new( $secret_key, 'Blowfish' );
}
elsif ( lc $c{DBI_encryptiontype} eq 'blowfish_pp' ) {
$cipher = $CIPHERS{"blowfish_pp:$auth_name"} ||=
Crypt::CBC->new( $secret_key, 'Blowfish_PP' );
}
else {
$r->log_reason(
"Apache::AuthCookieDBI: unknown encryption type $c{ DBI_encryptiontype } for auth realm $auth_name",
$r->uri
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookieDBIRadius.pm view on Meta::CPAN
use Apache::DBI;
use Apache::Constants;
use Apache::File;
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
# Added IPC::ShareLite.
use IPC::ShareLite qw( LOCK_EX LOCK_SH LOCK_UN LOCK_NB );
# Added Radius.
AuthCookieDBIRadius.pm view on Meta::CPAN
#===============================================================================
# P A C K A G E G L O B A L S
#===============================================================================
use vars qw( %CIPHERS );
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
use vars qw( %SECRET_KEYS );
# Stores secret keys for MD5 checksums and encryption for each auth realm in
# $SECRET_KEYS{ AuthName }.
AuthCookieDBIRadius.pm view on Meta::CPAN
#'des', 'idea', 'blowfish', or 'blowfish_pp'.
#This is not required and defaults to 'none'.'
$c{ DBI_encryptiontype } = _dir_config_var( $r, 'DBI_EncryptionType' ) || 'none';
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{ DBI_encryptiontype } ne 'none' )
{
require Crypt::CBC;
}
#<WhatEverDBI_SessionLifetime>
#How long tickets are good for after being issued. Note that presently
#Apache::AuthCookie does not set a client-side expire time, which means that
AuthCookieDBIRadius.pm view on Meta::CPAN
$encrypted_session_key = $session_key;
}
elsif ( lc $c{ DBI_encryptiontype } eq 'des' )
{
$CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
$encrypted_session_key = $CIPHERS{
"des:$auth_name"
}->encrypt_hex( $session_key );
}
elsif ( lc $c{ DBI_encryptiontype } eq 'idea' )
{
$CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
$encrypted_session_key = $CIPHERS{
"idea:$auth_name"
}->encrypt_hex( $session_key );
}
elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish' )
{
$CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
$encrypted_session_key = $CIPHERS{
"blowfish:$auth_name"
}->encrypt_hex( $session_key );
}
AuthCookieDBIRadius.pm view on Meta::CPAN
# Get the cipher from the cache, or create a new one if the
# cached cipher hasn't been created, & decrypt the session key.
my $cipher;
if ( lc $c{ DBI_encryptiontype } eq 'des' ) {
$cipher = $CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'idea' ) {
$cipher = $CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish' ) {
$cipher = $CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish_pp' ) {
$cipher = $CIPHERS{ "blowfish_pp:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish_PP' );
} else {
$r->log_reason( "Apache::AuthCookieDBIRadius: unknown encryption type $c{ DBI_encryptiontype } for auth realm $auth_name", $r->uri );
return undef;
}
$session_key = $cipher->decrypt_hex( $encrypted_session_key );
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookieLDAP.pm view on Meta::CPAN
use Apache;
use Apache::Constants;
use Apache::File;
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
use Net::LDAP qw(LDAP_SUCCESS);
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
AuthCookieLDAP.pm view on Meta::CPAN
#===============================================================================
# P A C K A G E G L O B A L S
#===============================================================================
use vars qw( %CIPHERS );
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
use vars qw( %SECRET_KEYS );
# Stores secret keys for MD5 checksums and encryption for each auth realm in
# $SECRET_KEYS{ AuthName }.
AuthCookieLDAP.pm view on Meta::CPAN
=cut
$c{ LDAP_encryptiontype } = _dir_config_var( $r, 'LDAP_EncryptionType' )
|| 'none';
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{ LDAP_encryptiontype } ne 'none' ) {
require Crypt::CBC;
}
=item C<WhatEverLDAP_SessionLifetime>
How long tickets are good for after being issued. Note that presently
AuthCookieLDAP.pm view on Meta::CPAN
my $encrypted_session_key;
if ( $c{ LDAP_encryptiontype } eq 'none' ) {
$encrypted_session_key = $session_key;
} elsif ( lc $c{ LDAP_encryptiontype } eq 'des' ) {
$CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
$encrypted_session_key = $CIPHERS{
"des:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ LDAP_encryptiontype } eq 'idea' ) {
$CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
$encrypted_session_key = $CIPHERS{
"idea:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ LDAP_encryptiontype } eq 'blowfish' ) {
$CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
$encrypted_session_key = $CIPHERS{
"blowfish:$auth_name"
}->encrypt_hex( $session_key );
}
AuthCookieLDAP.pm view on Meta::CPAN
# Get the cipher from the cache, or create a new one if the
# cached cipher hasn't been created, & decrypt the session key.
my $cipher;
if ( lc $c{ LDAP_encryptiontype } eq 'des' ) {
$cipher = $CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
} elsif ( lc $c{ LDAP_encryptiontype } eq 'idea' ) {
$cipher = $CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
} elsif ( lc $c{ LDAP_encryptiontype } eq 'blowfish' ) {
$cipher = $CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
} elsif ( lc $c{ LDAP_encryptiontype } eq 'blowfish_pp' ) {
$cipher = $CIPHERS{ "blowfish_pp:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish_PP' );
} else {
$r->log_reason( "Apache::AuthCookieLDAP: unknown encryption type $c{ LDAP_encryptiontype } for auth realm $auth_name", $r->uri );
return undef;
}
$session_key = $cipher->decrypt_hex( $encrypted_session_key );
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookiePAM.pm view on Meta::CPAN
@ISA = qw( Apache::AuthCookie );
use Apache::File;
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
AuthCookiePAM.pm view on Meta::CPAN
#===============================================================================
# P A C K A G E G L O B A L S
#===============================================================================
use vars qw( %CIPHERS );
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
use vars qw( %SECRET_KEYS );
# Stores secret keys for MD5 checksums and encryption for each auth realm in
# $SECRET_KEYS{ AuthName }.
AuthCookiePAM.pm view on Meta::CPAN
=cut
$c{ PAM_encryptiontype } = _dir_config_var( $r, 'PAM_EncryptionType' )
|| 'none';
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{ PAM_encryptiontype } ne 'none' ) {
require Crypt::CBC;
}
=item C<WhatEverPAM_service>
The service that will be using PAM libraries for authentication.
AuthCookiePAM.pm view on Meta::CPAN
my $encrypted_session_key;
if ( $c{ PAM_encryptiontype } eq 'none' ) {
$encrypted_session_key = $session_key;
} elsif ( lc $c{ PAM_encryptiontype } eq 'des' ) {
$CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
$encrypted_session_key = $CIPHERS{
"des:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ PAM_encryptiontype } eq 'idea' ) {
$CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
$encrypted_session_key = $CIPHERS{
"idea:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ PAM_encryptiontype } eq 'blowfish' ) {
$CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
$encrypted_session_key = $CIPHERS{
"blowfish:$auth_name"
}->encrypt_hex( $session_key );
}
$pamh=0;
AuthCookiePAM.pm view on Meta::CPAN
# Get the cipher from the cache, or create a new one if the
# cached cipher hasn't been created, & decrypt the session key.
my $cipher;
if ( lc $c{ PAM_encryptiontype } eq 'des' ) {
$cipher = $CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'DES' );
} elsif ( lc $c{ PAM_encryptiontype } eq 'idea' ) {
$cipher = $CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'IDEA' );
} elsif ( lc $c{ PAM_encryptiontype } eq 'blowfish' ) {
$cipher = $CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish' );
} elsif ( lc $c{ PAM_encryptiontype } eq 'blowfish_pp' ) {
$cipher = $CIPHERS{ "blowfish_pp:$auth_name" }
||= Crypt::CBC->new( $secret_key, 'Blowfish_PP' );
} else {
$r->log_reason( "Apache::AuthCookiePAM: unknown encryption type $c{ PAM_encryptiontype } for auth realm $auth_name", $r->uri );
return undef;
}
$session_key = $cipher->decrypt_hex( $encrypted_session_key );
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 METHODS
=cut
use strict;
use Crypt::CBC;
use Crypt::Rijndael;
use MIME::Base64 ();
use Storable ();
use Digest::SHA1 ();
my $obj = $$self{_cipher_obj};
return $obj if $obj;
my $cipher = $self->getCipher($req);
$key = $self->getCipherKey($req) if $key eq '';
$obj = Crypt::CBC->new({ cipher => $cipher, key => $key });
$$self{_cipher_obj} = $obj;
return $obj;
}
sub getDigestObject {
view all matches for this distribution
view release on metacpan or search on metacpan
Auth/Auth.pm view on Meta::CPAN
use strict;
use Apache;
use Apache::Registry;
use Apache::Constants qw(:common);
use IO::Socket::INET;
use Crypt::CBC;
use vars qw($VERSION);
$VERSION = '0.4';
Auth/Auth.pm view on Meta::CPAN
my $mesg;
my $my_rand = rand();
my $return_rand;
my $crypt_key = $r->dir_config("AuthCryptKey");
my $crypt = new Crypt::CBC ( $crypt_key, "Blowfish" );
$mesg = $crypt->encrypt_hex ("$my_rand:$session_id:$type:$username:$passcode");
$client->send($mesg);
$client->recv($mesg, 1024);
Auth/Auth.pm view on Meta::CPAN
For AuthenSecurID::Auth you need to enable the appropriate call-back hook
when making mod_perl:
perl Makefile.PL PERL_AUTHEN=1
AuthenSecurID::Auth requires Crypt::Blowfish and Crypt::CBC.
For AuthenSecurID::Auth to properly track users mod_usertrack must be
compiled and enabled.
view all matches for this distribution
view release on metacpan or search on metacpan
AutoLogin.pm view on Meta::CPAN
}
## a a md5_hex checksum to the string.
$string.=md5_hex($string);
my $cipher = new Crypt::Rijndael $key, Crypt::Rijndael::MODE_CBC;
# encrypt the string.
$string=$cipher->encrypt($string);
return $string;
AutoLogin.pm view on Meta::CPAN
if (length($string) % 16 !=0)
{
return "";
}
my $cipher = new Crypt::Rijndael $key, Crypt::Rijndael::MODE_CBC;
# decrypt it
my $decrypted=$cipher->decrypt($string);
# Chop of the last 32 bytes (this is the md5 checksum)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SWIT/Maker.pm view on Meta::CPAN
package Apache::SWIT::Maker;
use base 'Class::Accessor';
use File::Path;
use File::Basename qw(dirname basename);
use File::Copy;
use Crypt::CBC;
use Cwd qw(abs_path getcwd);
use Apache::SWIT::Maker::GeneratorsQueue;
use Apache::SWIT::Maker::FileWriterData;
use Apache::SWIT::Maker::Conversions;
use Apache::SWIT::Maker::Config;
lib/Apache/SWIT/Maker.pm view on Meta::CPAN
ENDM
}
sub write_seal_key {
swmani_write_file("conf/seal.key"
, md5_hex(Crypt::CBC->random_bytes(8)));
}
sub write_httpd_conf_in {
my $self = shift;
my $rl = Apache::SWIT::Maker::Config->instance->root_location;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
use Apache::SdnFw::lib::DB;
#use Apache::SdnFw::lib::Memcached;
use Apache::SdnFw::object::home;
use Template;
use LWP::UserAgent;
use Crypt::CBC;
use Crypt::Blowfish;
use XML::Dumper;
use XML::Simple;
use Net::SMTP::SSL;
use Net::FTP;
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
sub encrypt {
my $s = shift;
my $data = shift;
my $k = $s->{env}{CRYPT_KEY} || 'ilikegreeneggsandhamsamiam';
my $cipher = new Crypt::CBC($k,'Blowfish');
my $out = $cipher->encrypt($data) if ($data);
my @tmp;
foreach my $c (split '', $out) {
push @tmp, unpack('c',$c);
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
foreach my $c (split /\|/, $data) {
$tmp .= pack('c',$c);
}
my $k = $s->{env}{CRYPT_KEY} || 'ilikegreeneggsandhamsamiam';
my $cipher = new Crypt::CBC($k,'Blowfish');
my $out = $cipher->decrypt($tmp) if ($tmp);
return $out;
}
view all matches for this distribution
view release on metacpan or search on metacpan
SecSess/Wrapper.pm view on Meta::CPAN
my $key = $class->_initkey($method, $keyarg);
# crunch key and instantiate cipher object
my $cipher = Crypt::Rijndael->new(
pack('a16 a16', md5('1'.$key), md5('2'.$key)),
Crypt::Rijndael::MODE_CBC
);
return bless({cipher => $cipher}, $class);
}
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SiteControl/UserFactory.pm view on Meta::CPAN
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Apache::SiteControl::User;
use Crypt::CBC;
our $VERSION = "1.0";
our $engine;
our $encryption_key;
lib/Apache/SiteControl/UserFactory.pm view on Meta::CPAN
{
my $cipher = shift;
my $key = shift;
if(!defined($engine)) {
$engine = Crypt::CBC->new({ key => $key, cipher => $cipher });
}
}
# Params: Apache request, username, password, other credentials...
sub makeUser
lib/Apache/SiteControl/UserFactory.pm view on Meta::CPAN
This might be necessary if you are logging the user in and out of services on
the back end (like in webmail and database apps).
=item UserObjectPasswordCipher (default CAST5)
The CBC cipher used for encrypting the user passwords in the session files (See
Crypt::CBC for info on allowed ciphers...this value is passed directly to
Crypt::CBC->new). If you are saving user passwords, they will be encrypted when
stored in the apache session files. This gives a little bit of added security,
and makes the apache config the only sensitive file (since that is where you
configure the key itself) instead of every random session file that is laying
around on disk.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
use Apache2::ServerUtil;
use Carp qw();
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
# Also uses Apache2::Session if you're using sessions.
use English qw(-no_match_vars);
#===============================================================================
# FILE (LEXICAL) G L O B A L S
#===============================================================================
my %CIPHERS = ();
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
use constant COLON_REGEX => qr/ : /mx;
use constant DATE_TIME_STRING_REGEX =>
qr/ \A \d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2} \z /mx;
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
}
my %cipher_for_type = (
des => sub {
return $CIPHERS{"des:$auth_name"}
|| Crypt::CBC->new( -key => $secret_key, -cipher => 'DES' );
},
idea => sub {
return $CIPHERS{"idea:$auth_name"}
|| Crypt::CBC->new( -key => $secret_key, -cipher => 'IDEA' );
},
blowfish => sub {
return $CIPHERS{"blowfish:$auth_name"}
|| Crypt::CBC->new(
-key => $secret_key,
-cipher => 'Blowfish'
);
},
blowfish_pp => sub {
return $CIPHERS{"blowfish_pp:$auth_name"}
|| Crypt::CBC->new(
-key => $secret_key,
-cipher => 'Blowfish_PP'
);
},
);
lib/Apache2/AuthCookieDBI.pm view on Meta::CPAN
if ( !defined $c{$variable} ) {
$class->_log_not_set( $r, $variable );
}
}
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{'DBI_EncryptionType'} ne 'none' ) {
require Crypt::CBC;
}
# Compile module for password encryption, if needed.
if ( $c{'DBI_CryptType'} =~ /^sha/ ) {
require Digest::SHA;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
use Apache::DBI;
use Apache2::Const -compile => qw( OK HTTP_FORBIDDEN );
use Apache2::ServerUtil;
use Digest::MD5 qw( md5_hex );
use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
# Also uses Crypt::CBC if you're using encrypted cookies.
# Also uses Apache2::Session if you're using sessions.
#===============================================================================
# F U N C T I O N D E C L A R A T I O N S
#===============================================================================
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
#===============================================================================
# P A C K A G E G L O B A L S
#===============================================================================
use vars qw( %CIPHERS );
# Stores Cipher::CBC objects in $CIPHERS{ idea:AuthName },
# $CIPHERS{ des:AuthName } etc.
our @Extra_Data; # CSA Patch - needed for keeping cookie active
#===============================================================================
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
$c{ DBI_sessionmodule } = _dir_config_var( $r, 'DBI_SessionModule' );
$c{ DBI_SessionActiveReset } = _dir_config_var( $r, 'DBI_SessionActiveReset' ) || 0;
return %c;
# If we used encryption we need to pull in Crypt::CBC.
require Crypt::CBC if ( $c{ DBI_encryptiontype } ne 'none' );
return %c;
}
#-------------------------------------------------------------------------------
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
# Get the cipher from the cache, or create a new one if the
# cached cipher hasn't been created, & decrypt the session key.
my $cipher;
if ( lc $c{ DBI_encryptiontype } eq 'des' ) {
$cipher = $CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'DES' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'idea' ) {
$cipher = $CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'IDEA' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish' ) {
$cipher = $CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'Blowfish' );
} elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish_pp' ) {
$cipher = $CIPHERS{ "blowfish_pp:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'Blowfish_PP' );
} else {
$r->log_error( "Apache2::AuthCookieDBImg: unknown encryption type $c{ DBI_encryptiontype } for auth realm $auth_name", $r->uri );
return undef;
}
$session_key = $cipher->decrypt_hex( $encrypted_session_key );
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
my $encrypted_session_key;
if ( $c{ DBI_encryptiontype } eq 'none' ) {
$encrypted_session_key = $session_key;
} elsif ( lc $c{ DBI_encryptiontype } eq 'des' ) {
$CIPHERS{ "des:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'DES' );
$encrypted_session_key = $CIPHERS{
"des:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ DBI_encryptiontype } eq 'idea' ) {
$CIPHERS{ "idea:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'IDEA' );
$encrypted_session_key = $CIPHERS{
"idea:$auth_name"
}->encrypt_hex( $session_key );
} elsif ( lc $c{ DBI_encryptiontype } eq 'blowfish' ) {
$CIPHERS{ "blowfish:$auth_name" }
||= Crypt::CBC->new( $secretkey, 'Blowfish' );
$encrypted_session_key = $CIPHERS{
"blowfish:$auth_name"
}->encrypt_hex( $session_key );
}
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
Apache2::ServerUtil
Date::Calc
Digest::MD5
Apache2::Session (if using sessions)
Cipher::CBC (if using CBC Ciphers)
=head1 SEE ALSO
Latest version: http://search.cpan.org/search?query=Apache%3A%3AAuthCookieDBImg&mode=all
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
use APR::Const -compile => qw(:error ENOTIME SUCCESS);
use English qw(-no_match_vars);
use Digest::MD5 qw(md5_hex);
use Crypt::CBC;
use Crypt::DES;
use Net::LDAP;
use constant CIPHER_TYPES => qw(DES IDEA Blowfish Blowfish_PP);
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
unless ( exists $ciphers{$cipher_key} ) {
my $secret_key = $self->config( $r, C_SECRET_KEY );
foreach my $cipher_type (CIPHER_TYPES) {
next unless lc($cipher_type) eq $cipher;
$ciphers{$cipher_key} = Crypt::CBC->new(
-key => $secret_key,
-cipher => $cipher_type
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
under the same terms as perl itself.
Reg Quinton <reggers@ist.uwaterloo.ca>
"Stay calm, be brave, wait for the signs."
Dead Dog Cafe/CBC Radio
view all matches for this distribution
view release on metacpan or search on metacpan
by Yvan Rodrigues, and Reg Quinton (both) University of Waterloo with similar
copyright.
-- Reg Quinton <reggers@ist.uwaterloo.ca>
"Stay calm, be brave, wait for the signs."
Dead Dog Cafe/CBC Radio
view all matches for this distribution
view release on metacpan or search on metacpan
Auth/Auth.pm view on Meta::CPAN
use ModPerl::Registry;
use Apache2::porting;
use Apache2::Request;
use Apache2::Const qw(:common);
use IO::Socket::INET;
use Crypt::CBC;
use CGI qw(:standard);
use vars qw($VERSION);
$VERSION = '0.5';
Auth/Auth.pm view on Meta::CPAN
my $mesg;
my $my_rand = rand();
my $return_rand;
my $crypt_key = $r->dir_config("AuthCryptKey");
my $crypt = new Crypt::CBC( $crypt_key, "Blowfish" );
$mesg =
$crypt->encrypt_hex("$my_rand:$session_id:$type:$username:$passcode");
$client->send($mesg);
Auth/Auth.pm view on Meta::CPAN
For AuthenSecurID::Auth you need to enable the appropriate call-back hook
when making mod_perl:
perl Makefile.PL PERL_AUTHEN=1
AuthenSecurID::Auth requires Crypt::Blowfish and Crypt::CBC.
For AuthenSecurID::Auth to properly track users mod_usertrack must be
compiled and enabled.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/ClickPath.pm view on Meta::CPAN
use Apache2::Const -compile => qw(DECLINED OK
OR_ALL RSRC_CONF
TAKE1 RAW_ARGS NO_ARGS);
use MIME::Base64 ();
use Crypt::CBC ();
use Crypt::Blowfish ();
use Digest::MD5 ();
use Digest::CRC ();
use Apache2::ClickPath::_parse ();
lib/Apache2/ClickPath.pm view on Meta::CPAN
my $len4=do {use integer; (length( $l[1] )+3)/4;};
$len4*=4;
$l[1]=MIME::Base64::decode_base64( $l[1].('='x($len4-length( $l[1] ))) );
if( exists $cf->{ClickPathSecret} ) {
my $crypt=Crypt::CBC->new(
-key=>$cf->{ClickPathSecret},
-keysize=>length($cf->{ClickPathSecret}),
-cipher=>'Crypt::Blowfish',
-literal_key=>1,
-header=>'none',
lib/Apache2/ClickPath.pm view on Meta::CPAN
$rcounter%=2**16;
$session=pack( 'C', Digest::CRC::crc8( $session ) ).$session;
if( exists $cf->{ClickPathSecret} ) {
my $crypt=Crypt::CBC->new(
-key=>$cf->{ClickPathSecret},
-keysize=>length($cf->{ClickPathSecret}),
-cipher=>'Crypt::Blowfish',
-literal_key=>1,
-header=>'none',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/POST200.pm view on Meta::CPAN
TAKE1 TAKE12 TAKE123 TAKE3 FLAG OR_ALL
M_POST M_GET
HTTP_OK REDIRECT NOT_FOUND};
use MIME::Base64 ();
use Crypt::CBC ();
use Crypt::Blowfish ();
use Digest::MD5 ();
use Digest::CRC ();
use DBI;
lib/Apache2/POST200.pm view on Meta::CPAN
return Apache2::Const::NOT_FOUND
unless( $r->method_number==Apache2::Const::M_GET and
length( $r->args )==32+length($cf->{location}->[0]) );
my $crypt=Crypt::CBC->new(
-key=>$cf->{secret}->[0],
-keysize=>length($cf->{secret}->[0]),
-cipher=>'Crypt::Blowfish',
-literal_key=>1,
-header=>'none',
lib/Apache2/POST200.pm view on Meta::CPAN
);
$rcounter%=2**16;
$session=pack( 'C', Digest::CRC::crc8( $session ) ).$session;
my $crypt=Crypt::CBC->new(
-key=>$cf->{secret}->[0],
-keysize=>length($cf->{secret}->[0]),
-cipher=>'Crypt::Blowfish',
-literal_key=>1,
-header=>'none',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/SiteControl/UserFactory.pm view on Meta::CPAN
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Apache2::SiteControl::User;
use Crypt::CBC;
our $engine;
our $encryption_key;
sub init_engine
{
my $cipher = shift;
my $key = shift;
if(!defined($engine)) {
$engine = Crypt::CBC->new({ key => $key, cipher => $cipher });
}
}
# Params: Apache request, username, password, other credentials...
sub makeUser
lib/Apache2/SiteControl/UserFactory.pm view on Meta::CPAN
This might be necessary if you are logging the user in and out of services on
the back end (like in webmail and database apps).
=item UserObjectPasswordCipher (default CAST5)
The CBC cipher used for encrypting the user passwords in the session files (See
Crypt::CBC for info on allowed ciphers...this value is passed directly to
Crypt::CBC->new). If you are saving user passwords, they will be encrypted when
stored in the apache session files. This gives a little bit of added security,
and makes the apache config the only sensitive file (since that is where you
configure the key itself) instead of every random session file that is laying
around on disk.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2_4/AuthCookieMultiDBI.pm view on Meta::CPAN
if ( !defined $c{$variable} ) {
$self->_log_not_set( $r, $variable );
}
}
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{'DBI_EncryptionType'} ne 'none' ) {
require Crypt::CBC;
}
# Compile module for password encryption, if needed.
if ( $c{'DBI_CryptType'} =~ '^sha') {
require Digest::SHA;
lib/Apache2_4/AuthCookieMultiDBI.pm view on Meta::CPAN
}
my %cipher_for_type = (
des => sub {
return $CIPHERS{"des:$auth_name"}
|| Crypt::CBC->new( -key => $secret_key, -cipher => 'DES' );
},
idea => sub {
return $CIPHERS{"idea:$auth_name"}
|| Crypt::CBC->new( -key => $secret_key, -cipher => 'IDEA' );
},
blowfish => sub {
return $CIPHERS{"blowfish:$auth_name"}
|| Crypt::CBC->new(
-key => $secret_key,
-cipher => 'Blowfish'
);
},
blowfish_pp => sub {
return $CIPHERS{"blowfish_pp:$auth_name"}
|| Crypt::CBC->new(
-key => $secret_key,
-cipher => 'Blowfish_PP'
);
},
);
view all matches for this distribution
view release on metacpan or search on metacpan
Encrypted.pm view on Meta::CPAN
require Apache;
use strict;
use warnings;
use Crypt::CBC;
use Carp;
use vars qw($VERSION $key);
$VERSION = '0.03';
Encrypted.pm view on Meta::CPAN
sub _encrypt_data {
my $data = shift;
croak("Can't encrypt anything without a key!") unless $key;
my $cipher = new Crypt::CBC($key,'Blowfish');
if (ref($data) eq "ARRAY") {
for (my $i = 0; $i <= $#$data; $i++) {
$data->[$i] = $cipher->encrypt_hex($data->[$i]);
}
Encrypted.pm view on Meta::CPAN
sub _decrypt_data {
my $data = shift;
croak("Can't decrypt anything without a key!") unless $key;
my $cipher = new Crypt::CBC($key,'Blowfish');
if (ref($data) eq "ARRAY") {
for (my $i = 0; $i <= $#$data; $i++) {
$data->[$i] = $cipher->decrypt_hex($data->[$i]);
}
Encrypted.pm view on Meta::CPAN
Jamie Krasnoo<jkrasnoo@socal.rr.com>
=head1 CREDITS
Apache::Cookie - docs and modules - Doug MacEachern
Crypt::CBC - Lincoln Stein, lstein@cshl.org
Crypt::Blowfish - Dave Paris <amused@pobox.com> and those mentioned in the module.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Acmeman/Source/Apache.pm view on Meta::CPAN
<Macro LetsEncryptSSL \$domain>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:E...
SSLCertificateFile $acme_dir/\$domain/cert.pem
SSLCertificateKeyFile $acme_dir/\$domain/privkey.pem
SSLCACertificateFile $acme_dir/$App::Acmeman::letsencrypt_root_cert_basename
</Macro>
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
=item I<%test_keys_password>
The same private keys as in L</%test_keys_plaintext>, but
protected with C<secret> as the password. Keys are the same as in
I<%test_keys_plaintext>; values are encrypted using 3DES-CBC,
as if by the command
openssl rsa -des3 -passout pass:secret -in test.key
=cut
our %test_keys_password =
(rsa1024 => <<RSA1024,
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,106A001EF5153939
+rxNdLaRxeXQ0j59ySdfeOeGS0nAYvH9JHaKTwazHg4HO4rt0LiJJ8TF/7hMlNXB
WAPl7Qz3Pynr/NCjgU7QU92K1ZDh6fSoZYgyDqMoZJRQbgwvubRnsqlhgeX2NPE+
FLzn8auohpWiKBHN7EQrIZf7uKfk8G1VmVcMNL6FGQ/1QPCaGoE1+IOizIq3wqxH
bXn2hIy8n8sNnqEBBmBkw2iFqOUMYX3JcfXTQzbKdlgWi4HLozK+wGypNlihSm/s
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
-----END RSA PRIVATE KEY-----
RSA1024
rsa2048 => <<RSA2048,
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,E3164422C4E0B305
uGlTnFwMuSTot47PzsLknHWRAPC5ZgOubZ6pmiNCF2ljSAx/ut5eS+Ri9VuxNVe3
KHfM096qA4x0yzwwioqRulgo0ZJYajfHQKsrGCZmpRJWTUPPXGADUSfyecnn/2VA
LkCsipovIRnnl3dLje3kEfUagrObUzZG35ohwswwgAHm3Hu/8gQCOk7jFZtaV3/k
0mIHd5v3pNw4LrFCGm8bDGQEJECVCkapLr6kIN7fWLiKtp8SFD5f+eBSdzr17R8T
view all matches for this distribution