From: Steve Peters <steve@fisharerojo.org> Date: Sat, 26 Nov 2005 11:50:17 +0000 (+0000) Subject: Upgrade to Digest-MD5-2.35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e770d9c3a08e9c537fed3a8d1bbb8879d74522d;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Digest-MD5-2.35 p4raw-id: //depot/perl@26211 --- diff --git a/ext/Digest/MD5/Changes b/ext/Digest/MD5/Changes index 1a49ffd..394843e 100644 --- a/ext/Digest/MD5/Changes +++ b/ext/Digest/MD5/Changes @@ -1,3 +1,28 @@ +2005-11-26 Gisle Aas <gisle@ActiveState.com> + + Release 2.35 + + Forgot to incorporate fixes already applied to bleadperl :-( + - doc typo + - consting + - unused my_na + - USE_HEAP_INSTEAD_OF_STACK for Symbian + + + +2005-11-26 Gisle Aas <gisle@ActiveState.com> + + Release 2.34 + + Document that it is now easy to generate different messages that produce the + same MD5 digest. + + Use XSLoader; perl-5.6 is now required. + + Tweaks to the processing of $? after running the test program. + + + 2003-12-07 Gisle Aas <gisle@ActiveState.com> Release 2.33 diff --git a/ext/Digest/MD5/MD5.pm b/ext/Digest/MD5/MD5.pm index a26b1c2..985aa4f 100644 --- a/ext/Digest/MD5/MD5.pm +++ b/ext/Digest/MD5/MD5.pm @@ -3,15 +3,12 @@ package Digest::MD5; use strict; use vars qw($VERSION @ISA @EXPORT_OK); -$VERSION = '2.33_01'; # $Date: 2003/12/07 08:40:18 $ +$VERSION = '2.35'; # $Date: 2005/11/26 11:09:06 $ require Exporter; *import = \&Exporter::import; @EXPORT_OK = qw(md5 md5_hex md5_base64); -require DynaLoader; -@ISA=qw(DynaLoader); - eval { require Digest::base; push(@ISA, 'Digest::base'); @@ -23,7 +20,8 @@ if ($@) { eval { - Digest::MD5->bootstrap($VERSION); + require XSLoader; + XSLoader::load('Digest::MD5', $VERSION); }; if ($@) { my $olderr = $@; @@ -78,6 +76,13 @@ Inc. MD5 Message Digest algorithm from within Perl programs. The algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. +Note that the MD5 algorithm is not as strong as it used to be. It has +since 2005 been easy to generate different messages that produce the +same MD5 digest. It still seems hard to generate messages that +produce a given digest, but it is probably wise to move to stronger +algorithms for application depends on the digest to uniquely identify +a message. + The C<Digest::MD5> module provide a procedural interface for simple use, as well as an object oriented interface that can handle messages of arbitrary length and which can read files directly. @@ -312,6 +317,11 @@ L<md5sum(1)> RFC 1321 +http://en.wikipedia.org/wiki/Md5 + +The paper "How to Break MD5 and Other Hash Functions" by Xiaoyun Wang +and Hongbo Yu. + =head1 COPYRIGHT This library is free software; you can redistribute it and/or diff --git a/ext/Digest/MD5/MD5.xs b/ext/Digest/MD5/MD5.xs index 100c597..c246338 100644 --- a/ext/Digest/MD5/MD5.xs +++ b/ext/Digest/MD5/MD5.xs @@ -1,4 +1,4 @@ -/* $Id: MD5.xs,v 1.42 2003/12/06 22:35:16 gisle Exp $ */ +/* $Id: MD5.xs,v 1.45 2005/11/26 11:06:20 gisle Exp $ */ /* * This library is free software; you can redistribute it and/or diff --git a/ext/Digest/MD5/Makefile.PL b/ext/Digest/MD5/Makefile.PL index 3448572..a3f79da 100644 --- a/ext/Digest/MD5/Makefile.PL +++ b/ext/Digest/MD5/Makefile.PL @@ -1,6 +1,6 @@ #!perl -w -BEGIN { require 5.004 } +BEGIN { require 5.006 } use strict; use Config qw(%Config); use ExtUtils::MakeMaker; @@ -136,15 +136,13 @@ EOT return 1 unless $rc; if ($rc > 0x80) { - $rc >>= 8; - print "Test program exit status was $rc\n"; - } else { - if ($rc & 0x80) { - $rc &= ~0x80; - print "Core dump deleted\n"; - unlink("core"); - } - print "signal $rc\n"; + (my $cp = $rc) >>= 8; + print "Test program exit status was $cp\n"; + } + if ($rc & 0x80) { + $rc &= ~0x80; + unlink("core") && print "Core dump deleted\n"; } + print "signal $rc\n" if $rc && $rc < 0x80; return 0; } diff --git a/ext/Digest/MD5/t/files.t b/ext/Digest/MD5/t/files.t index bf12125..c507483 100644 --- a/ext/Digest/MD5/t/files.t +++ b/ext/Digest/MD5/t/files.t @@ -20,27 +20,27 @@ use Digest::MD5 qw(md5 md5_hex md5_base64); my $EXPECT; if (ord "A" == 193) { # EBCDIC $EXPECT = <<EOT; -15e4c91ad67f5ff238033305376c9140 Changes +9020dd8ce0395531c330f453fcdffd6c Changes 0565ec21b15c0f23f4c51fb327c8926d README -7c54765a9e5b3557d2e81e0b03061bc4 MD5.pm -3976133077e98165b1eeaeaeb0ee19f4 MD5.xs +4fc3e605f5b157f01b18de1809c5cdd4 MD5.pm +b61eb1bba8cc490040d02f6bf24874f7 MD5.xs 276da0aa4e9a08b7fe09430c9c5690aa rfc1321.txt EOT } elsif ("\n" eq "\015") { # MacOS $EXPECT = <<EOT; -dea016b088ab4d88a5e7cbd9c15a9c88 Changes +eb3aa2263f2e3b748616e63f93e1bb27 Changes 6c950a0211a5a28f023bb482037698cd README -389cd19bcf7700b826ae88068cd6ff15 MD5.pm -3e3605289c64e6bfff64d8b5e370672d MD5.xs +09bb20af6d2679d05b39b6544e0b3710 MD5.pm +716c3278fd80338727c100e5d2a76795 MD5.xs 754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt EOT } else { # This is the output of: 'md5sum Changes README MD5.pm MD5.xs rfc1321.txt' $EXPECT = <<EOT; -0f09886e2c129bdabf57674c6822bd4f Changes +5f415836f042e939c6ab19ee7746929b Changes 6c950a0211a5a28f023bb482037698cd README -389cd19bcf7700b826ae88068cd6ff15 MD5.pm -3e3605289c64e6bfff64d8b5e370672d MD5.xs +09bb20af6d2679d05b39b6544e0b3710 MD5.pm +716c3278fd80338727c100e5d2a76795 MD5.xs 754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt EOT }