2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 00:10:54 +00:00
qpdf/libqpdf/qpdf/Pl_RC4.hh
Jay Berkenbilt a68703b07e Replace PointerHolder with std::shared_ptr in library sources only
(patrepl and cleanpatch are my own utilities)

patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh
patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc
patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc
patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc
patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh
git restore include/qpdf/PointerHolder.hh
cleanpatch
./format-code
2022-04-09 17:33:29 -04:00

36 lines
700 B
C++

#ifndef PL_RC4_HH
#define PL_RC4_HH
#include <qpdf/Pipeline.hh>
#include <qpdf/RC4.hh>
class Pl_RC4: public Pipeline
{
public:
static size_t const def_bufsize = 65536;
// key_len of -1 means treat key_data as a null-terminated string
QPDF_DLL
Pl_RC4(
char const* identifier,
Pipeline* next,
unsigned char const* key_data,
int key_len = -1,
size_t out_bufsize = def_bufsize);
QPDF_DLL
virtual ~Pl_RC4();
QPDF_DLL
virtual void write(unsigned char* data, size_t len);
QPDF_DLL
virtual void finish();
private:
std::shared_ptr<unsigned char> outbuf;
size_t out_bufsize;
RC4 rc4;
};
#endif // PL_RC4_HH