r37922 - in /branches/upstream/libdigest-perl/current: Changes Digest.pm Digest/base.pm Digest/file.pm MANIFEST META.yml t/base.t t/file.t

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Wed Jun 10 02:43:10 UTC 2009


Author: nhandler-guest
Date: Wed Jun 10 02:43:05 2009
New Revision: 37922

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37922
Log:
[svn-upgrade] Integrating new upstream version, libdigest-perl (1.16)

Added:
    branches/upstream/libdigest-perl/current/META.yml
Modified:
    branches/upstream/libdigest-perl/current/Changes
    branches/upstream/libdigest-perl/current/Digest.pm
    branches/upstream/libdigest-perl/current/Digest/base.pm
    branches/upstream/libdigest-perl/current/Digest/file.pm
    branches/upstream/libdigest-perl/current/MANIFEST
    branches/upstream/libdigest-perl/current/t/base.t
    branches/upstream/libdigest-perl/current/t/file.t

Modified: branches/upstream/libdigest-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/Changes?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/Changes (original)
+++ branches/upstream/libdigest-perl/current/Changes Wed Jun 10 02:43:05 2009
@@ -1,4 +1,18 @@
-2006-13-20   Gisle Aas <gisle at ActiveState.com>
+2009-06-09   Gisle Aas <gisle at ActiveState.com>
+
+   Release 1.16.
+
+   Gisle Aas (3):
+      For SHA-1 try Digest::SHA before tryign Digest::SHA1 as suggested by Adam Trickett
+      Support Digest->new("RIPEMD-160") as suggested by Zefram
+      Use 3-arg open for fewer surprises
+
+   Jarkko Hietaniemi (1):
+      Sync up with EBCDIC changes from core perl.
+
+
+
+2006-03-20   Gisle Aas <gisle at ActiveState.com>
 
    Release 1.15.
 

Modified: branches/upstream/libdigest-perl/current/Digest.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/Digest.pm?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/Digest.pm (original)
+++ branches/upstream/libdigest-perl/current/Digest.pm Wed Jun 10 02:43:05 2009
@@ -3,10 +3,10 @@
 use strict;
 use vars qw($VERSION %MMAP $AUTOLOAD);
 
-$VERSION = "1.15";
+$VERSION = "1.16";
 
 %MMAP = (
-  "SHA-1"      => ["Digest::SHA1", ["Digest::SHA", 1], ["Digest::SHA2", 1]],
+  "SHA-1"      => [["Digest::SHA", 1], "Digest::SHA1", ["Digest::SHA2", 1]],
   "SHA-224"    => [["Digest::SHA", 224]],
   "SHA-256"    => [["Digest::SHA", 256], ["Digest::SHA2", 256]],
   "SHA-384"    => [["Digest::SHA", 384], ["Digest::SHA2", 384]],
@@ -16,6 +16,7 @@
   "CRC-16"     => [["Digest::CRC", type => "crc16"]],
   "CRC-32"     => [["Digest::CRC", type => "crc32"]],
   "CRC-CCITT"  => [["Digest::CRC", type => "crcccitt"]],
+  "RIPEMD-160" => "Crypt::PIPEMD160",
 );
 
 sub new

Modified: branches/upstream/libdigest-perl/current/Digest/base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/Digest/base.pm?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/Digest/base.pm (original)
+++ branches/upstream/libdigest-perl/current/Digest/base.pm Wed Jun 10 02:43:05 2009
@@ -2,7 +2,7 @@
 
 use strict;
 use vars qw($VERSION);
-$VERSION = "1.00";
+$VERSION = "1.16";
 
 # subclass is supposed to implement at least these
 sub new;

Modified: branches/upstream/libdigest-perl/current/Digest/file.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/Digest/file.pm?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/Digest/file.pm (original)
+++ branches/upstream/libdigest-perl/current/Digest/file.pm Wed Jun 10 02:43:05 2009
@@ -8,7 +8,7 @@
 
 use vars qw($VERSION @ISA @EXPORT_OK);
 
-$VERSION = "1.00";
+$VERSION = "1.16";
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(digest_file_ctx digest_file digest_file_hex digest_file_base64);
 
@@ -16,7 +16,7 @@
     my $file = shift;
     croak("No digest algorithm specified") unless @_;
     local *F;
-    open(F, $file) || croak("Can't open '$file': $!");
+    open(F, "<", $file) || croak("Can't open '$file': $!");
     binmode(F);
     my $ctx = Digest->new(@_);
     $ctx->addfile(*F);

Modified: branches/upstream/libdigest-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/MANIFEST?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/MANIFEST (original)
+++ branches/upstream/libdigest-perl/current/MANIFEST Wed Jun 10 02:43:05 2009
@@ -9,3 +9,4 @@
 t/base.t
 t/digest.t
 t/file.t
+META.yml                                 Module meta-data (added by MakeMaker)

Added: branches/upstream/libdigest-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/META.yml?rev=37922&op=file
==============================================================================
--- branches/upstream/libdigest-perl/current/META.yml (added)
+++ branches/upstream/libdigest-perl/current/META.yml Wed Jun 10 02:43:05 2009
@@ -1,0 +1,19 @@
+--- #YAML:1.0
+name:               Digest
+version:            1.16
+abstract:           ~
+author:  []
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    MIME::Base64:  0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.4801
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libdigest-perl/current/t/base.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/t/base.t?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/t/base.t (original)
+++ branches/upstream/libdigest-perl/current/t/base.t Wed Jun 10 02:43:05 2009
@@ -32,17 +32,25 @@
 
 my $ctx = LenDigest->new;
 ok($ctx->digest, "X0000");
-ok($ctx->hexdigest, "5830303030");
-ok($ctx->b64digest, "WDAwMDA");
+
+my $EBCDIC = ord('A') == 193;
+
+if ($EBCDIC) {
+    ok($ctx->hexdigest, "e7f0f0f0f0");
+    ok($ctx->b64digest, "5/Dw8PA");
+} else {
+    ok($ctx->hexdigest, "5830303030");
+    ok($ctx->b64digest, "WDAwMDA");
+}
 
 $ctx->add("foo");
 ok($ctx->digest, "f0003");
 
 $ctx->add("foo");
-ok($ctx->hexdigest, "6630303033");
+ok($ctx->hexdigest, $EBCDIC ? "86f0f0f0f3" : "6630303033");
 
 $ctx->add("foo");
-ok($ctx->b64digest, "ZjAwMDM");
+ok($ctx->b64digest, $EBCDIC ? "hvDw8PM" : "ZjAwMDM");
 
 open(F, ">xxtest$$") || die;
 binmode(F);
@@ -61,7 +69,7 @@
 };
 ok($@ =~ /^Number of bits must be multiple of 8/);
 
-$ctx->add_bits("01010101");
+$ctx->add_bits($EBCDIC ? "11100100" : "01010101");
 ok($ctx->digest, "U0001");
 
 eval {

Modified: branches/upstream/libdigest-perl/current/t/file.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdigest-perl/current/t/file.t?rev=37922&op=diff
==============================================================================
--- branches/upstream/libdigest-perl/current/t/file.t (original)
+++ branches/upstream/libdigest-perl/current/t/file.t Wed Jun 10 02:43:05 2009
@@ -37,8 +37,14 @@
 close(F) || die "Can't write '$file': $!";
 
 ok(digest_file($file, "Foo"), "0005");
-ok(digest_file_hex($file, "Foo"), "30303035");
-ok(digest_file_base64($file, "Foo"), "MDAwNQ");
+
+if (ord('A') == 193) { # EBCDIC.
+    ok(digest_file_hex($file, "Foo"), "f0f0f0f5");
+    ok(digest_file_base64($file, "Foo"), "8PDw9Q");
+} else {
+    ok(digest_file_hex($file, "Foo"), "30303035");
+    ok(digest_file_base64($file, "Foo"), "MDAwNQ");
+}
 
 unlink($file) || warn "Can't unlink '$file': $!";
 




More information about the Pkg-perl-cvs-commits mailing list