summaryrefslogtreecommitdiff
path: root/lib/Digest.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-01-17 20:23:42 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-01-17 20:23:42 +0000
commit70ee44090a3faf48295f65df1a1fe1c53d04be10 (patch)
tree29c749305a6d329b8b7d52e409eebe9c6844f2ef /lib/Digest.pm
parent02c98640c78c9ee380d0e9638477c0e15d11a202 (diff)
downloadperl-70ee44090a3faf48295f65df1a1fe1c53d04be10.tar.gz
Upgrade to Digest 1.01.
p4raw-id: //depot/perl@18511
Diffstat (limited to 'lib/Digest.pm')
-rw-r--r--lib/Digest.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Digest.pm b/lib/Digest.pm
index 9727a1c4b9..4ad93ff40a 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.00";
+$VERSION = "1.01";
%MMAP = (
"SHA-1" => "Digest::SHA1",
@@ -124,11 +124,16 @@ 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 an instance method (i.e. $ctx->new) it will just
+If new() is called as a 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).
+=item $other_ctx = $ctx->clone
+
+The clone method creates a copy of the digest state object and returns
+a reference to the copy.
+
=item $ctx->reset
This is just an alias for $ctx->new.
@@ -151,7 +156,8 @@ Return the binary digest for the message.
Note that the C<digest> operation is effectively a destructive,
read-once operation. Once it has been performed, the $ctx object is
automatically C<reset> and can be used to calculate another digest
-value.
+value. Call $ctx->clone->digest if you want to calculate the digest
+without reseting the digest state.
=item $ctx->hexdigest