mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-29 21:49:04 +00:00
5d4cad9c02
Significantly improve the code's use of off_t for file offsets, size_t for memory sizes, and integer types in cases where there has to be compatibility with external interfaces. Rework sections of the code that would have prevented qpdf from working on files larger than 2 (or maybe 4) GB in size.
35 lines
806 B
C++
35 lines
806 B
C++
#ifndef __PL_MD5_HH__
|
|
#define __PL_MD5_HH__
|
|
|
|
// This pipeline sends its output to its successor unmodified. After
|
|
// calling finish, the MD5 checksum of the data that passed through
|
|
// the pipeline is available.
|
|
|
|
// This pipeline is reusable; i.e., it is safe to call write() after
|
|
// calling finish(). The first call to write() after a call to
|
|
// finish() initializes a new MD5 object.
|
|
|
|
#include <qpdf/Pipeline.hh>
|
|
#include <qpdf/MD5.hh>
|
|
|
|
class Pl_MD5: public Pipeline
|
|
{
|
|
public:
|
|
QPDF_DLL
|
|
Pl_MD5(char const* identifier, Pipeline* next);
|
|
QPDF_DLL
|
|
virtual ~Pl_MD5();
|
|
QPDF_DLL
|
|
virtual void write(unsigned char*, size_t);
|
|
QPDF_DLL
|
|
virtual void finish();
|
|
QPDF_DLL
|
|
std::string getHexDigest();
|
|
|
|
private:
|
|
bool in_progress;
|
|
MD5 md5;
|
|
};
|
|
|
|
#endif // __PL_MD5_HH__
|