in reply to Re: Re: Using MD5 and the theory behind it
in thread Using MD5 and the theory behind it
For reasonable-sized files (ones that fit comfortably in system memory): load the file's contents into a perl scalar, say $foo. Then $fingerprint = md5($foo);
If you look through the documentation you have for it, you'll get some advice on other methods; e.g. (the object-oriented versions) :
my $file ="/file/to/hash"; my $md5 = Digest::MD5->new(); $md5->addfile($file); $md5->add("seekrit passwerd"); # not the best choice for one, but ... my $digest = $md5->digest;
I got this straight out of the docs, more or less. HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(correction) Re (5): Using MD5 and the theory behind it
by mwp (Hermit) on Jan 11, 2001 at 07:04 UTC |