Oh, I interpreted differently. I thought that it destroys the 'digest'
rather than the data.
Thanks all for waking me up! I needed an eye-opener.
====================================
Ranga Nathan
Reliance Technology
Legacy to Web integration consultancy
Text to web-database-spreadsheet, datamarts
ADABAS, NATURAL, Perl, Apache, Linux, Wintel solutions
Tel: 617 884 9801 Fax: 781 623 5646
http://www.cobolexplorer.com - cobol listings on the web
http://www.any2xml.com - text to anything
http://www.goreliance.com
http://www.adaexplorer.com - ADAREP on the web + stats



|-----Original Message-----
|From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
|Christopher Redinger
|Sent: Friday, March 22, 2002 12:00 PM
|To: Ranga Nathan
|Cc: mongers of perl
|Subject: Re: [Boston.pm] MD5 hash
|
|
|On Fri, 2002-03-22 at 17:40, Ranga Nathan wrote:
|>  $digest = $ctx->digest;
|>  print "digest is = $digest\n";
|>  $digest = $ctx->hexdigest;
|>  print "hex digest is = $digest\n";
|>  $digest = $ctx->b64digest;
|>  print "base 64 digest is = $digest\n";
|
|perldoc Digest::MD5
|
|       $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.
|
|
|So, your subsequent calls to hexdigest and b64digest are being called
|on a blank md5 object.
|

Reply via email to