/src/qpdf/libqpdf/qpdf/Pl_RC4.hh
Line | Count | Source |
1 | | #ifndef PL_RC4_HH |
2 | | #define PL_RC4_HH |
3 | | |
4 | | #include <qpdf/Pipeline.hh> |
5 | | |
6 | | #include <qpdf/RC4.hh> |
7 | | |
8 | | class Pl_RC4 final: public Pipeline |
9 | | { |
10 | | public: |
11 | | static size_t const def_bufsize = 65536; |
12 | | |
13 | | // key_len of -1 means treat key_data as a null-terminated string |
14 | | Pl_RC4( |
15 | | char const* identifier, Pipeline* next, std::string key, size_t out_bufsize = def_bufsize); |
16 | 1.64k | ~Pl_RC4() final = default; |
17 | | |
18 | | void write(unsigned char const* data, size_t len) final; |
19 | | void finish() final; |
20 | | |
21 | | private: |
22 | | std::shared_ptr<unsigned char> outbuf; |
23 | | size_t out_bufsize; |
24 | | RC4 rc4; |
25 | | }; |
26 | | |
27 | | #endif // PL_RC4_HH |