summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-01-20 17:48:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-01-20 17:48:51 +0000
commit67859229b2af3ba90e55d42060c363e9c83849bf (patch)
tree7099c452a8b6dc7728977be82359fc6f173db220 /lib
parent2c28e92fc113ea28fd1822b2d63d3c1bfedbac8f (diff)
downloadperl-67859229b2af3ba90e55d42060c363e9c83849bf.tar.gz
Upgrade to Digest 1.02.
p4raw-id: //depot/perl@18523
Diffstat (limited to 'lib')
-rw-r--r--lib/Digest.pm4
-rw-r--r--lib/Digest.t9
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/Digest.pm b/lib/Digest.pm
index 4ad93ff40a..8ebf61a487 100644
--- a/lib/Digest.pm
+++ b/lib/Digest.pm
@@ -3,7 +3,7 @@ package Digest;
use strict;
use vars qw($VERSION %MMAP $AUTOLOAD);
-$VERSION = "1.01";
+$VERSION = "1.02";
%MMAP = (
"SHA-1" => "Digest::SHA1",
@@ -124,7 +124,7 @@ load the right module on first use. The second form allow you to use
algorithm names which contains letters which are not legal perl
identifiers, e.g. "SHA-1".
-If new() is called as a instance method (i.e. $ctx->new) it will just
+If new() is called as an instance method (i.e. $ctx->new) it will just
reset the state the object to the state of a newly created object. No
new object is created in this case, and the return value is the
reference to the object (i.e. $ctx).
diff --git a/lib/Digest.t b/lib/Digest.t
index 5741b777fe..fbc2dac805 100644
--- a/lib/Digest.t
+++ b/lib/Digest.t
@@ -1,13 +1,9 @@
print "1..3\n";
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
use Digest;
-my $hexdigest = "900150983cd24fb0d6963f7d28e17f72";
+my $hexdigest = "900150983cd24fb0d6963f7d28e17f72"; # ASCII
+
if (ord('A') == 193) { # EBCDIC
$hexdigest = "fe4ea0d98f9cd8d1d27f102a93cb0bb0"; # IBM-1047
}
@@ -19,6 +15,7 @@ print "not " unless Digest->MD5->add("abc")->hexdigest eq $hexdigest;
print "ok 2\n";
eval {
+ # Not yet EBCDICified.
print "not " unless Digest->new("HMAC-MD5" => "Jefe")->add("what do ya want for nothing?")->hexdigest eq "750c783e6ab0b503eaa86e310a5db738";
print "ok 3\n";
};