Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(correction) Re (5): Using MD5 and the theory behind it

by mwp (Hermit)
on Jan 11, 2001 at 07:04 UTC ( [id://51066]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Using MD5 and the theory behind it
in thread Using MD5 and the theory behind it

Small correction:
my $file = "/file/to/hash"; my $md5 = Digest::MD5->new(); open(MD5, $file) || die "Unable to open file: $!\n"; binmode(MD5); $md5->addfile(*MD5); $md5->add("seekrit passwerd"); # tee hee my $digest = $md5->digest;
Your original code will not work with the latest Digest::MD5, producing the error "Not a valid filehandle." I know this because I'm currently writing a utility script that uses MD5 to verify downloaded files (for the Slackware distrib, actually) and I tried it your way to no avail. =)

'kaboo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://51066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found