ext/Digest/MD5/typemap Digest::MD5 extension
ext/Digest/SHA/bin/shasum shasum script
ext/Digest/SHA/Changes Digest::SHA changes
+ext/Digest/SHA/lib/Digest/SHA.pm Digest::SHA extension
ext/Digest/SHA/Makefile.PL Digest::SHA Makefile.PL
ext/Digest/SHA/README Digest::SHA README
-ext/Digest/SHA/SHA.pm Digest::SHA extension
ext/Digest/SHA/SHA.xs Digest::SHA extension
ext/Digest/SHA/src/hmac.c Digest::SHA extension
ext/Digest/SHA/src/hmac.h Digest::SHA extension
Revision history for Perl extension Digest::SHA.
+5.47 Wed Apr 30 04:00:54 MST 2008
+ - modified Makefile.PL to install in core for Perls >= 5.10
+ -- thanks to Jerry Hedden for patch
+ - changed from #include <> to #include "" in SHA.xs
+ -- some platforms not able to find SHA source files
+ -- thanks to Alexandr Ciornii for testing
+ - moved .pm file to appropriate lib directory
+ - minor addition to META.yml
+
5.46 Wed Apr 9 05:04:00 MST 2008
- modified Addfile to recognize leading and trailing
whitespace in filenames (ref. rt.cpan.org #34690)
-require 5.006000;
+require 5.003000;
use ExtUtils::MakeMaker;
use Getopt::Std;
use Config;
+my $PM = 'lib/Digest/SHA.pm';
+
my %opts;
getopts('tx', \%opts);
-my @defines = ('-DSHA_PERL_MODULE');
-
+my @defines;
+push(@defines, '-DSHA_PERL_MODULE') if $] >= 5.004;
push(@defines, '-DSHA_THREAD_SAFE') if $opts{'t'};
push(@defines, '-DNO_SHA_384_512') if $opts{'x'};
my $define = join(' ', @defines);
-WriteMakefile(
+my %att = (
'NAME' => 'Digest::SHA',
- 'VERSION_FROM' => 'SHA.pm',
- 'PREREQ_PM' => {},
- 'AUTHOR' => 'Mark Shelor <mshelor@cpan.org>',
+ 'VERSION_FROM' => $PM,
'LIBS' => [''],
- MAN3PODS => {}, # Pods will be built by installman.
'DEFINE' => $define,
'INC' => '-I.',
- 'NO_META' => 1,
+ 'EXE_FILES' => [ 'shasum' ],
+ 'INSTALLDIRS' => ($] >= 5.010) ? 'perl' : 'site',
);
+
+my $MMversion = $ExtUtils::MakeMaker::VERSION || 0;
+$att{NO_META} = 1 unless $MMversion < 6.10_03;
+
+WriteMakefile(%att);
-Digest::SHA version 5.46
+Digest::SHA version 5.47
========================
Digest::SHA is a complete implementation of the NIST Secure Hash
#include "perl.h"
#include "XSUB.h"
-#include <src/sha.c>
-#include <src/hmac.c>
+#include "src/sha.c"
+#include "src/hmac.c"
static int ix2alg[] =
{1,1,1,224,224,224,256,256,256,384,384,384,512,512,512};
PROTOTYPES: ENABLE
-#include <src/sha.h>
-#include <src/hmac.h>
+#include "src/sha.h"
+#include "src/hmac.h"
#ifndef INT2PTR
#define INT2PTR(p, i) (p) (i)
#
# Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved
#
- # Version: 5.46
- # Wed Apr 9 05:04:00 MST 2008
+ # Version: 5.47
+ # Wed Apr 30 04:00:54 MST 2008
=head1 NAME
use FileHandle;
use Getopt::Long;
-my $VERSION = "5.46";
+my $VERSION = "5.47";
# Try to use Digest::SHA, since it's faster. If not installed,
*
* Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
*
- * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved
+ * Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved
*
- * Version: 5.46
- * Wed Apr 9 05:04:00 MST 2008
+ * Version: 5.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
*
* Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
*
- * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved
+ * Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved
*
- * Version: 5.46
- * Wed Apr 9 05:04:00 MST 2008
+ * Version: 5.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
*
* Ref: NIST FIPS PUB 180-2 Secure Hash Standard
*
- * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved
+ * Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved
*
- * Version: 5.46
- * Wed Apr 9 05:04:00 MST 2008
+ * Version: 5.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
*
* Ref: NIST FIPS PUB 180-2 Secure Hash Standard
*
- * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved
+ * Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved
*
- * Version: 5.46
- * Wed Apr 9 05:04:00 MST 2008
+ * Version: 5.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(
hmac_sha1 hmac_sha1_base64 hmac_sha1_hex
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha1_base64 sha224_base64 sha256_base64
sha384_base64 sha512_base64));
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha384_hex sha512_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(hmac_sha1_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(hmac_sha256_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw());
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(hmac_sha1_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha1_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha224_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha256_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha384_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(sha512_hex));
}
my $MODULE;
BEGIN {
- $MODULE = ($ENV{PERL_CORE} || -e "SHA.pm") ? "Digest::SHA" : "Digest::SHA::PurePerl";
+ $MODULE = ($ENV{PERL_CORE} || -d "src") ? "Digest::SHA" : "Digest::SHA::PurePerl";
eval "require $MODULE" || die $@;
$MODULE->import(qw(hmac_sha256_hex hmac_sha384_hex hmac_sha512_hex));
}