BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
eval "use Test::More";
if ($@) {
print "1..0 # Skipped: Test::More not installed\n";
BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+
eval "use Test::More";
if ($@) {
print "1..0 # Skipped: Test::More not installed\n";
use Test;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
BEGIN { plan tests => 1 }
use Digest::SHA qw(
use Digest::SHA qw(sha1);
use strict;
use integer;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
my(@vec, @rsp);
use integer;
use Digest::SHA qw(sha1_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, @rsp);
BEGIN {
use integer;
use Digest::SHA qw(sha224_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, @rsp);
BEGIN {
use integer;
use Digest::SHA qw(sha256_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, @rsp);
BEGIN {
use integer;
use Digest::SHA qw(sha384_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, @rsp);
BEGIN {
use integer;
use Digest::SHA qw(sha512_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, @rsp);
BEGIN {
use integer;
use Digest::SHA qw(sha1_base64 sha224_base64 sha256_base64 sha384_base64 sha512_base64);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec, $data);
BEGIN {
use File::Spec;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec);
BEGIN {
use File::Spec;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my @hashes;
BEGIN {
use File::Spec;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my @hashes;
BEGIN {
use integer;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
# SHA-1 Test Vectors
#
# In the following we use the notation bitstring#n to mean a bitstring
use File::Spec;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
# SHA-1 Test Vectors
#
# In the following we use the notation bitstring#n to mean a bitstring
use integer;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
BEGIN { plan tests => 1 }
my $i;
use integer;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
BEGIN { plan tests => 1 }
my $i;
use integer;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
BEGIN { plan tests => 1 }
my $reps = 8000000;
use integer;
use Digest::SHA qw(hmac_sha1_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec);
BEGIN {
use integer;
use Digest::SHA qw(hmac_sha1_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@vec);
BEGIN {
use integer;
use Digest::SHA qw(hmac_sha256_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@data);
BEGIN {
use integer;
use Digest::SHA qw(hmac_sha256_hex hmac_sha384_hex hmac_sha512_hex);
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
BEGIN { plan tests => 21 }
# Use RFC 2202 data/key values for 512-bit blocks
use File::Basename qw(dirname);
use File::Spec;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
my(@sharsp);
BEGIN {
use File::Spec;
use Digest::SHA;
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
# David Ireland's test vector - SHA-256 digest of "a" x 536870912
# Adapted from Julius Duque's original script (t/24-ireland.tmp)