skazat has asked for the wisdom of the Perl Monks concerning the following question:
I'm having a time banging my head on this one...
Is there anything that would cause :
sub create_checksum { my $self = shift; my $data = shift; my $foo = $$data; use Digest::MD5; my $ctx = Digest::MD5->new; my $cs = $ctx->md5_hex($foo); warn "data: " . $foo; warn "checksum: " . $cs; return $cs; }
From actually giving me different checksum each time it's run?
This seems to be what I'm seeing. If I create a small script that calls just this method in this Module, it seems that everything works correctly, but when I call it from a larger (too large to post) script, it gives me a different checksum!
The only thing I can fathom is that something in the script is mucking about with something in Perl. The only thing out of the ordinary in the script is that it's calliing many time related functions, time() localtime, etc.
Is there anything I should look out for when created Digest::MD5 checksums? I'm on FreeBSD 4.5, perl 5.8, MD5 version 2.22. I've also seen these results using just Digest::Perl::MD5. I'm totally stumped, and I know that this isn't much to go by, but that's my problem too.
Is there something I"m just totally missing? I'm not really a green thumb with this Perl thing...
Cheers,
-justin simoni
!skazat!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MD5 Peculiarities
by gmax (Abbot) on Jun 22, 2003 at 10:11 UTC | |
by isotope (Deacon) on Jun 22, 2003 at 15:03 UTC | |
by skazat (Chaplain) on Jun 23, 2003 at 04:53 UTC | |
|
Re: MD5 Peculiarities
by cchampion (Curate) on Jun 22, 2003 at 07:57 UTC | |
by skazat (Chaplain) on Jun 22, 2003 at 08:03 UTC | |
|
Re: MD5 Peculiarities
by antirice (Priest) on Jun 22, 2003 at 07:09 UTC | |
by bart (Canon) on Jun 22, 2003 at 13:01 UTC | |
|
Re: MD5 Peculiarities
by skazat (Chaplain) on Jun 22, 2003 at 07:12 UTC | |
|
Re: MD5 Peculiarities
by gellyfish (Monsignor) on Jun 22, 2003 at 09:14 UTC | |
|
Re: MD5 Peculiarities
by Zaxo (Archbishop) on Jun 22, 2003 at 16:16 UTC |