blob: df5e1587f235db54f1f06666f9e4071f4d7419e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#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
Pl_RC4(
char const* identifier,
Pipeline* next,
unsigned char const* key_data,
int key_len = -1,
size_t out_bufsize = def_bufsize);
virtual ~Pl_RC4();
virtual void write(unsigned char* data, size_t len);
virtual void finish();
private:
std::shared_ptr<unsigned char> outbuf;
size_t out_bufsize;
RC4 rc4;
};
#endif // PL_RC4_HH
|