debian/0000755000000000000000000000000012070065030007157 5ustar debian/rules0000755000000000000000000000003612070065030010236 0ustar #!/usr/bin/make -f %: dh $@ debian/control0000644000000000000000000000362212070065030010565 0ustar Source: libcrypt-ecb-perl Maintainer: Debian Perl Group Uploaders: Ivan Kohler , Xavier Guimard Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: libcrypt-blowfish-perl, libcrypt-cast5-perl, libcrypt-des-perl, libcrypt-rijndael-perl, perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libcrypt-ecb-perl.git Vcs-Git: git://git.debian.org/pkg-perl/packages/libcrypt-ecb-perl.git Homepage: http://search.cpan.org/dist/Crypt-ECB/ Package: libcrypt-ecb-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libcrypt-blowfish-perl | libcrypt-cast5-perl | libcrypt-des-ede3-perl | libcrypt-des-perl | libcrypt-eksblowfish-perl | libcrypt-twofish-perl Suggests: libcrypt-blowfish-perl, libcrypt-cast5-perl, libcrypt-des-ede3-perl, libcrypt-des-perl, libcrypt-eksblowfish-perl, libcrypt-twofish-perl Description: Perl library to encrypt data using ECB mode Crypt::ECB is a Perl-only implementation of the ECB mode. In combination with a block cipher such as DES, IDEA or Blowfish, you can encrypt and decrypt messages of arbitrarily long length. Though for security reasons other modes than ECB such as CBC should be preferred. See textbooks on cryptography if you want to know why. . The functionality of the module can be accessed via OO methods or via standard function calls. Remember that some crypting module like for example Blowfish has to be installed. The syntax follows that of Crypt::CBC meaning you can access Crypt::ECB exactly like Crypt::CBC, though Crypt::ECB is more flexible. For example you can change the key or the cipher without having to create a new crypt object. debian/source/0000755000000000000000000000000012070065030010457 5ustar debian/source/format0000644000000000000000000000001412070065030011665 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000240112070065030011026 0ustar libcrypt-ecb-perl (1.45-1) unstable; urgency=low * Take over for the Debian Perl Group on maintainer's request (http://bugs.debian.org/677732#10) * Update debian/watch to version 3 * Imported Upstream version 1.45 * Update source format to 3.0 (quilt) * Update debian/copyright (years and format) * Bump Standards-Version to 3.9.4 * Bump debhelper compatibility to 8 * Update description * Update debian/rules to use "dh $@" * Add libcrypt-* in dependencies * Patch tests to use Test::More -- Xavier Guimard Fri, 28 Dec 2012 10:08:46 +0100 libcrypt-ecb-perl (1.40-2) unstable; urgency=low * Update debian/rules to current dh-make-perl template to fix "unconditional rmdir" FTBFS (closes: Bug#467728) * Fix upstream changelog installation -- Ivan Kohler Tue, 26 Feb 2008 21:54:28 -0800 libcrypt-ecb-perl (1.40-1) unstable; urgency=high * New upstream release, fixes possible security problem with weak encoding of ASCII "0" * Add watch file for uscan -- Ivan Kohler Fri, 21 Jan 2005 17:54:26 -0800 libcrypt-ecb-perl (1.1-2-1) unstable; urgency=low * Initial Release (closes: Bug#284378). -- Ivan Kohler Sun, 5 Dec 2004 15:38:46 -0800 debian/compat0000644000000000000000000000000212070065030010355 0ustar 8 debian/patches/0000755000000000000000000000000012070065030010606 5ustar debian/patches/series0000644000000000000000000000003112070065030012015 0ustar use-standard-tests.patch debian/patches/use-standard-tests.patch0000644000000000000000000002264212070065030015367 0ustar Description: Use standards tests Author: Xavier Guimard Bug: https://rt.cpan.org/Ticket/Display.html?id=82301 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=82301 Last-Update: 2012-12-28 --- a/t/70-funcstyle.t +++ b/t/70-funcstyle.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB qw(encrypt decrypt PADDING_AUTO); +#use Crypt::ECB qw(encrypt decrypt PADDING_AUTO); my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>37; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok (Crypt::ECB, qw(encrypt decrypt PADDING_AUTO)) }; my ($crypt, $cipher, $key, $ks, $len, $nok, $enc1, $enc2, $dec1, $dec2, $test); @@ -31,27 +35,25 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 3 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $key = substr($xkey, 0, $ks); $crypt->key($key); - $nok = 0; + #$nok = 0; $enc1 = $crypt->encrypt($text); $enc2 = encrypt($key, $cipher, $text, PADDING_AUTO); - $nok++ unless ($enc1 eq $enc2); + ok($enc1 eq $enc2); $dec1 = $crypt->decrypt($enc1); $dec2 = decrypt($key, $cipher, $enc2, PADDING_AUTO); - $nok++ unless ($dec1 eq $text); - $nok++ unless ($dec2 eq $text); + ok($dec1 eq $text); + ok($dec2 eq $text); - print "not " if $nok; - print "ok ".(++$test)."\n"; + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/65-nullblock-2.t +++ b/t/65-nullblock-2.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB; +#use Crypt::ECB; my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>13; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $len, $nok, $enc, $dec, $test); @@ -31,20 +35,18 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); - $nok = 0; + #$nok = 0; $enc = $crypt->encrypt($text); - $nok++ unless $crypt->decrypt($enc) eq $text; + ok($crypt->decrypt($enc) eq $text); - print "not " if $nok; - print "ok ".(++$test)."\n"; + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/40-substr.t +++ b/t/40-substr.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB; +#use Crypt::ECB; my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>13; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $len, $nok, $enc, $dec, $test); @@ -31,11 +35,8 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); @@ -47,6 +48,8 @@ $dec = $crypt->decrypt($enc); $nok++ unless substr($text,0,$len) eq $dec; } - print "not " if $nok; - print "ok ".(++$test)."\n"; + ok($nok == 0); + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/60-nullblock-1.t +++ b/t/60-nullblock-1.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB; +#use Crypt::ECB; my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>13; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $len, $nok, $enc, $dec, $test); @@ -31,20 +35,18 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); - $nok = 0; + #$nok = 0; $enc = $crypt->encrypt($text); - $nok++ unless $crypt->decrypt($enc) eq $text; + ok($crypt->decrypt($enc) eq $text); - print "not " if $nok; - print "ok ".(++$test)."\n"; + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/75-funcstyle-nullblock.t +++ b/t/75-funcstyle-nullblock.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB qw(encrypt decrypt PADDING_AUTO); +#use Crypt::ECB qw(encrypt decrypt PADDING_AUTO); my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>37; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB', qw(encrypt decrypt PADDING_AUTO)) }; my ($crypt, $cipher, $key, $ks, $len, $nok, $enc1, $enc2, $dec1, $dec2, $test); @@ -31,27 +35,25 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 3 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $key = substr($xkey, 0, $ks); $crypt->key($key); - $nok = 0; + #$nok = 0; $enc1 = $crypt->encrypt($text); $enc2 = encrypt($key, $cipher, $text, PADDING_AUTO); - $nok++ unless ($enc1 eq $enc2); + ok($enc1 eq $enc2); $dec1 = $crypt->decrypt($enc1); $dec2 = decrypt($key, $cipher, $enc2, PADDING_AUTO); - $nok++ unless ($dec1 eq $text); - $nok++ unless ($dec2 eq $text); + ok($dec1 eq $text); + ok($dec2 eq $text); - print "not " if $nok; - print "ok ".(++$test)."\n"; + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/30-padding.t +++ b/t/30-padding.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB; +#use Crypt::ECB; my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>25; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $len, $nok, $enc, $dec, $test); @@ -29,24 +33,24 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 2 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); - $nok = 0; + #$nok = 0; $crypt->padding(PADDING_AUTO); $enc = $crypt->encrypt($text); - $nok++ unless $crypt->decrypt($enc) eq $text; + ok($crypt->decrypt($enc) eq $text); + #$nok++ unless $crypt->decrypt($enc) eq $text; $crypt->padding(PADDING_NONE); - $nok++ unless $crypt->decrypt($enc) eq $text."\x02\x02"; + ok($crypt->decrypt($enc) eq $text."\x02\x02"); + #$nok++ unless $crypt->decrypt($enc) eq $text."\x02\x02"; - print "not " if $nok; - print "ok ".(++$test)."\n"; + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/10-encryption.t +++ b/t/10-encryption.t @@ -19,9 +19,11 @@ # 'Twofish2', '0958c674179aefaf13de8b25a613174dc40a90b80918bce55d314c86ecd3db45', ); -print "1..", scalar(keys %data), "\n"; +use Test::More tests=>12; -use Crypt::ECB; +#print "1..", scalar(keys %data), "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $enc, $test); @@ -34,16 +36,15 @@ foreach $cipher (sort keys %data) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); $enc = $crypt->encrypt_hex($text); - print "not " unless $enc eq $data{$cipher}; - print "ok ".(++$test)."\n"; + ok($enc eq $data{$cipher}); + #print "not " unless $enc eq $data{$cipher}; + #print "ok ".(++$test)."\n"; + } } --- a/t/50-caching.t +++ b/t/50-caching.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Crypt::ECB; +#use Crypt::ECB; my @ciphers = ( @@ -18,7 +18,11 @@ 'Twofish2', ); -print "1..", $#ciphers+1, "\n"; +use Test::More tests=>13; + +#print "1..", $#ciphers+1, "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $len, $nok, $enc, $dec, $test); @@ -31,11 +35,8 @@ foreach $cipher (@ciphers) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); @@ -54,6 +55,8 @@ $nok++ unless $text eq $dec; } - print "not " if $nok; - print "ok ".(++$test)."\n"; + ok($nok==0); + #print "not " if $nok; + #print "ok ".(++$test)."\n"; + } } --- a/t/20-decryption.t +++ b/t/20-decryption.t @@ -19,9 +19,11 @@ # 'Twofish2', '0958c674179aefaf13de8b25a613174dc40a90b80918bce55d314c86ecd3db45', ); -print "1..", scalar(keys %data), "\n"; +use Test::More tests=>12; -use Crypt::ECB; +#print "1..", scalar(keys %data), "\n"; + +BEGIN { use_ok ('Crypt::ECB') }; my ($crypt, $cipher, $ks, $dec, $test); @@ -34,16 +36,15 @@ foreach $cipher (sort keys %data) { - unless ($crypt->cipher($cipher)) - { - print "ok ".(++$test)." # skip, $cipher not installed\n"; - next; - } + SKIP: { + skip "$cipher not installed", 1 unless($crypt->cipher($cipher)); $ks = ($crypt->{Keysize} or 8); $crypt->key(substr($key,0,$ks)); $dec = $crypt->decrypt_hex($data{$cipher}); - print "not " unless $dec eq $text; - print "ok ".(++$test)."\n"; + ok($dec eq $text); + #print "not " unless $dec eq $text; + #print "ok ".(++$test)."\n"; + } } debian/copyright0000644000000000000000000000147112070065030011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Crypt-ECB Source: http://search.cpan.org/dist/Crypt-ECB/ Upstream-Contact: Christoph Appel Files: * Copyright: 2000-2008, Christoph Appel License: GPL-2+ Files: debian/* Copyright: 2004-2008, Ivan Kohler 2012, Xavier Guimard License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/watch0000644000000000000000000000015412070065030010210 0ustar version=3 http://search.cpan.org/dist/Crypt-ECB/ .*/Crypt-ECB-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)