1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 #ifndef SCSTREAMFILTER_RC4_H
9 #define SCSTREAMFILTER_RC4_H
10 
11 #include "scstreamfilter.h"
12 
13 #include <QByteArray>
14 
15 struct ScRC4EncodeFilterData;
16 
17 class ScRC4EncodeFilter : public ScStreamFilter
18 {
19 protected:
20 
21 	ScRC4EncodeFilterData* m_filterData;
22 	QByteArray             m_key;
23 
24 	void freeData(void);
25 	bool m_openedFilter;
26 
27 public:
28 	ScRC4EncodeFilter(QDataStream* stream, const char* key, unsigned int keyLen);
29 	ScRC4EncodeFilter(ScStreamFilter* filter, const char* key, unsigned int keyLen);
30 	~ScRC4EncodeFilter();
31 
32 	virtual bool openFilter ();
33 	virtual bool closeFilter();
34 
35 	virtual bool writeData(const char* data, int dataLen);
36 };
37 
38 #endif
39