Crypt-TripleDES-CBC
view release on metacpan or search on metacpan
"Test::Kwalitee::Extra" : "0",
"Test::More" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08",
"Test::Spelling" : "0.12",
"Test::Version" : "1"
}
},
"runtime" : {
"requires" : {
"Crypt::DES" : "0",
"Moose" : "0",
"perl" : "5.010",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
- inc
- t
- xt
package:
- DB
provides:
Crypt::TripleDES::CBC:
file: lib/Crypt/TripleDES/CBC.pm
version: 0.006
requires:
Crypt::DES: 0
Moose: 0
perl: 5.010
strict: 0
warnings: 0
resources:
bugtracker: https://github.com/shantanubhadoria/perl-crypt-tripledes-cbc/issues
homepage: https://metacpan.org/release/Crypt-TripleDES-CBC
repository: git://github.com/shantanubhadoria/perl-crypt-tripledes-cbc.git
version: 0.006
Makefile.PL view on Meta::CPAN
"ABSTRACT" => "Triple DES in CBC mode Pure implementation",
"AUTHOR" => "Shantanu Bhadoria <shantanu\@cpan.org> L<https://www.shantanubhadoria.com>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Crypt-TripleDES-CBC",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010",
"NAME" => "Crypt::TripleDES::CBC",
"PREREQ_PM" => {
"Crypt::DES" => 0,
"Moose" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"File::Temp" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
Makefile.PL view on Meta::CPAN
"Test::Most" => "0.22",
"blib" => "1.01"
},
"VERSION" => "0.006",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Crypt::DES" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"File::Temp" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Moose" => 0,
"Test::More" => 0,
"Test::Most" => "0.22",
"blib" => "1.01",
"strict" => 0,
say unpack("H*",$crypt->encrypt(pack("H*","0ABC0F2241535345631FCE"))); # Output F64F2268BF6185A16DADEFD7378E5CE5
say unpack("H*",$crypt->decrypt(pack("H*","F64F2268BF6185A16DADEFD7378E5CE5"))); # Output 0ABC0F2241535345631FCE0000000000
DESCRIPTION
Most Modules on CPAN don't do a standards compliant implementation,
while they are able to decrypt what they encrypt. There are corner
cases where certain blocks of data in a chain don't decrypt properly.
This is (almost)a pure perl implementation of TripleDES in CBC mode
using Crypt::DES to encrypt individual blocks.
ATTRIBUTES
cipher1
First Crypt::DES Cipher object generated from the key. This is built
automatically. Do not change this value from your program.
cipher2
second Crypt::DES Cipher object generated from the key. This is built
automatically. Do not change this value from your program.
key
Encryption Key this must be ascii packed string as shown in Synopsis.
iv
Initialization vector, default is a null string.
lib/Crypt/TripleDES/CBC.pm view on Meta::CPAN
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
our $VERSION = '0.006'; # VERSION
# Dependencies
use Moose;
use 5.010;
use Crypt::DES;
has cipher1 => (
is => 'ro',
lazy_build => 1,
);
sub _build_cipher1 {
my ($self) = @_;
my $cipher = new Crypt::DES( substr( $self->key, 0, 8 ) );
}
has cipher2 => (
is => 'ro',
lazy_build => 1,
);
sub _build_cipher2 {
my ($self) = @_;
my $cipher = new Crypt::DES( substr( $self->key, 8 ) );
}
has key => (
is => 'ro',
required => 1,
);
has iv => (
lib/Crypt/TripleDES/CBC.pm view on Meta::CPAN
);
say unpack("H*",$crypt->encrypt(pack("H*","0ABC0F2241535345631FCE"))); # Output F64F2268BF6185A16DADEFD7378E5CE5
say unpack("H*",$crypt->decrypt(pack("H*","F64F2268BF6185A16DADEFD7378E5CE5"))); # Output 0ABC0F2241535345631FCE0000000000
=head1 DESCRIPTION
Most Modules on CPAN don't do a standards compliant implementation, while they
are able to decrypt what they encrypt. There are corner cases where certain
blocks of data in a chain don't decrypt properly. This is (almost)a pure perl
implementation of TripleDES in CBC mode using Crypt::DES to encrypt individual
blocks.
=head1 ATTRIBUTES
=head2 cipher1
First Crypt::DES Cipher object generated from the key. This is built
automatically. Do not change this value from your program.
=head2 cipher2
second Crypt::DES Cipher object generated from the key. This is built
automatically. Do not change this value from your program.
=head2 key
Encryption Key this must be ascii packed string as shown in Synopsis.
=head2 iv
Initialization vector, default is a null string.
t/00-report-prereqs.dd view on Meta::CPAN
'Test::Kwalitee::Extra' => '0',
'Test::More' => '0',
'Test::Pod' => '1.41',
'Test::Pod::Coverage' => '1.08',
'Test::Spelling' => '0.12',
'Test::Version' => '1'
}
},
'runtime' => {
'requires' => {
'Crypt::DES' => '0',
'Moose' => '0',
'perl' => '5.010',
'strict' => '0',
'warnings' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '2.120900'
},
( run in 0.345 second using v1.01-cache-2.11-cpan-9a3d99fc6dc )