aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/Pl_RC4.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2008-04-29 14:55:25 +0200
committerJay Berkenbilt <ejb@ql.org>2008-04-29 14:55:25 +0200
commit9a0b88bf7777c153dc46ace22db74ef24d51583a (patch)
treef567ac1cf2bf5071a611eb49323a935b6ac938ff /libqpdf/qpdf/Pl_RC4.hh
downloadqpdf-9a0b88bf7777c153dc46ace22db74ef24d51583a.tar.zst
update release date to actual daterelease-qpdf-2.0
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf/Pl_RC4.hh')
-rw-r--r--libqpdf/qpdf/Pl_RC4.hh42
1 files changed, 42 insertions, 0 deletions
diff --git a/libqpdf/qpdf/Pl_RC4.hh b/libqpdf/qpdf/Pl_RC4.hh
new file mode 100644
index 00000000..6bebe5aa
--- /dev/null
+++ b/libqpdf/qpdf/Pl_RC4.hh
@@ -0,0 +1,42 @@
+
+#ifndef __PL_RC4_HH__
+#define __PL_RC4_HH__
+
+#include <qpdf/Pipeline.hh>
+
+#include <qpdf/RC4.hh>
+
+class Pl_RC4: public Pipeline
+{
+ public:
+ class Exception: public Pipeline::Exception
+ {
+ public:
+ Exception(std::string const& message) :
+ Pipeline::Exception(message)
+ {
+ }
+
+ virtual ~Exception() throw()
+ {
+ }
+ };
+
+ static int 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,
+ int out_bufsize = def_bufsize);
+ virtual ~Pl_RC4();
+
+ virtual void write(unsigned char* data, int len);
+ virtual void finish();
+
+ private:
+ unsigned char* outbuf;
+ int out_bufsize;
+ RC4 rc4;
+};
+
+#endif // __PL_RC4_HH__