use strict;
use vars qw($VERSION %MMAP $AUTOLOAD);
-$VERSION = "1.01";
+$VERSION = "1.02";
%MMAP = (
"SHA-1" => "Digest::SHA1",
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).
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
}
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";
};