From: Steve Peters 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 + + 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 + + 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 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 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 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 = <