Crypt-Skip32
view release on metacpan or search on metacpan
requires => {
'perl' => '5.8.0',
},
build_requires => {
'Test::More' => '0.62',
'Test::NoWarnings' => '0.084',
},
recommends => {
'Crypt::Skip32::XS' => 0,
'Test::Distribution' => 0,
'Crypt::CBC' => '2.22',
},
create_readme => 1,
create_makefile_pl => 'traditional',
sign => 1,
dynamic_config => 0,
keywords => [
'cryptography',
'encryption',
'decryption',
],
0.07 Sat May 24 23:33:49 PDT 2008
- Converted from Makefile.PL to Build.PL (Module::Build)
- Created examples/ subdirectory with one example.
- Added LICENSE file.
0.06 Sat May 24 18:16:00 PDT 2008
- Removed basic unit test dependency on Test::Exception
- Added unit test based on the unit test in the original C code.
- Tweak example in documentation.
- Specify required version of Crypt::CBC in unit test.
0.05 Wed Sep 26 23:44:21 2007
- Added unit test using optional Crypt::CBC (not recommended).
- Added unit tests with optional Test::Pod, Test::Pod::Coverage,
Test::Distribution
- Added SIGNATURE file with PGP signed SHA1 signatures of files.
- Documentation cleanup including bugfix in example code.
- Lowering required Perl to 5.8.0 to see if tests pass for a
wider audience.
- Changed to my unobfuscated email address in case automated
CPAN tools can use it. I'll worry about spam on the
receiving end.
"Test::NoWarnings" : "0.084"
}
},
"configure" : {
"requires" : {
"Module::Build" : "0.42"
}
},
"runtime" : {
"recommends" : {
"Crypt::CBC" : "2.22",
"Crypt::Skip32::XS" : "0",
"Test::Distribution" : "0"
},
"requires" : {
"perl" : "v5.8.0"
}
}
},
"provides" : {
"Crypt::Skip32" : {
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Crypt-Skip32
provides:
Crypt::Skip32:
file: lib/Crypt/Skip32.pm
version: '0.19'
recommends:
Crypt::CBC: '2.22'
Crypt::Skip32::XS: '0'
Test::Distribution: '0'
requires:
perl: v5.8.0
resources:
license: http://dev.perl.org/licenses/
version: '0.19'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
CAVEATS
This initial alpha Perl implementation of Crypt::Skip32 has not been
extentively reviewed by cryptographic experts, nor has it been tested
extensively on many different platforms. It is recommended that this
code not be used for applications which require a high level of
security.
Reviewers and testers welcomed.
Though this module has been coded to follow a Crypt::CBC usable
interface, it is not intended for use in encrypting long chunks of
text. For those purposes, it is suggested you use another high quality,
proven cipher with a longer block size.
INSTALLATION
If your Linux distro does not have a prepared package for this module,
then the preferred method for installation is directly from the CPAN
using a command like:
lib/Crypt/Skip32.pm view on Meta::CPAN
=head1 CAVEATS
This initial alpha Perl implementation of Crypt::Skip32 has not been
extentively reviewed by cryptographic experts, nor has it been tested
extensively on many different platforms. It is recommended that this
code not be used for applications which require a high level of
security.
Reviewers and testers welcomed.
Though this module has been coded to follow a Crypt::CBC usable
interface, it is not intended for use in encrypting long chunks of
text. For those purposes, it is suggested you use another high
quality, proven cipher with a longer block size.
=head1 INSTALLATION
If your Linux distro does not have a prepared package for this module,
then the preferred method for installation is directly from the CPAN
using a command like:
use strict;
use warnings;
use Test::More tests => 3;
use Test::NoWarnings;
# NOTE: Just because we are testing that Crypt::Skip32 works with
# Crypt::CBC does not mean that it is a good idea. In fact, we
# recommend against it.
#
# Crypt::Skip32 is intended for use in generating very small encrypted
# cipher text output which Crypt::CBC is not going to do. If you want
# to encrypt more than a few bytes of text, consider using one of the
# proven secure Crypt::* ciphers with larger cipher block sizes.
BEGIN { $ENV{CRYPT_SKIP32_PP} = 1; }
SKIP: {
eval "use Crypt::CBC 2.22";
skip "Crypt::CBC not installed", 2, if $@;
my $cbc_cipher = Crypt::CBC->new(
-literal_key => 1,
-key => pack("H20", "DE2624BD4FFC4BF09DAB"),
-iv => pack("H8", "7D8F7416"),
-cipher => 'Skip32',
-header => 'none',
);
my $number = 3493209676;
my $plaintext = pack("N", $number);
my $ciphertext = $cbc_cipher->encrypt($plaintext);
my $cipherhex = unpack("H*", $ciphertext);
is($cipherhex, '0de6cdf6c146bc02',
"encrypt with Crypt::CBC");
my $ciphertext2 = pack("H*", $cipherhex);
my $plaintext2 = $cbc_cipher->decrypt($ciphertext);
my $number2 = unpack("N", $plaintext2);
is($number2, $number,
"decrypt with Crypt::CBC");
}
( run in 1.428 second using v1.01-cache-2.11-cpan-e1769b4cff6 )