+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
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');
eval {
- Digest::MD5->bootstrap($VERSION);
+ require XSLoader;
+ XSLoader::load('Digest::MD5', $VERSION);
};
if ($@) {
my $olderr = $@;
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.
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
-/* $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
#!perl -w
-BEGIN { require 5.004 }
+BEGIN { require 5.006 }
use strict;
use Config qw(%Config);
use ExtUtils::MakeMaker;
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;
}
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
}