>>>>> "RN" == Ranga Nathan <[EMAIL PROTECTED]> writes:
RN> use Digest::MD5;
RN> $ctx = Digest::MD5->new;
RN> $ctx->add($data);
RN> $digest = $ctx->digest;
RN> print "digest is = $digest\n";
RN> $digest = $ctx->hexdigest;
$md5->digest
Return the binary digest for the message.
Note that the digest operation is effectively a
destructive, read-once operation. Once it has been
performed, the Digest::MD5 object is automatically reset
and can be used to calculate another digest value.
$md5->hexdigest
Same as $md5->digest, but will return the digest in
hexadecimal form.
you are calling hexdigest on an empty data input in both cases, hence
the same digest string.
you have to input the data again for each digest call
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org