Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Anyone have an example that checks the integrity of a pdf file?

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
  • Comment on Re: Anyone have an example that checks the integrity of a pdf file?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found