Perl Monk, Perl Meditation | |
PerlMonks |
Re: Anyone have an example that checks the integrity of a pdf file?by radiantmatrix (Parson) |
on Jul 26, 2007 at 20:12 UTC ( [id://628991]=note: print w/replies, xml ) | Need Help?? |
This is what message digests are designed for. One creates a digest from a known-good copy of data, and publishes that digest. Then, anyone wishing to determine if their copy of data is the same as the original (was not corrupted), takes the digest of their own copy. If the digests match, one is highly confident that file has not become corrupted. It would be fairly easy to perform either part of this process in batch, using Perl, by using one of the many Digest modules. Digest::MD5 is one of the most commonly used for this purpose.
<–radiant.matrix–>
Ramblings and references The Code that can be seen is not the true Code I haven't found a problem yet that can't be solved by a well-placed trebuchet
In Section
Seekers of Perl Wisdom
|
|