2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 00:10:54 +00:00
qpdf/libqpdf/qpdf/RC4.hh
Jay Berkenbilt f3d7c26de1 removed qexc; non-compatible ABI change
git-svn-id: svn+q:///qpdf/trunk@709 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-26 18:36:04 +00:00

26 lines
506 B
C++

#ifndef __RC4_HH__
#define __RC4_HH__
class RC4
{
public:
// key_len of -1 means treat key_data as a null-terminated string
RC4(unsigned char const* key_data, int key_len = -1);
// out_data = 0 means to encrypt/decrypt in place
void process(unsigned char* in_data, int len, unsigned char* out_data = 0);
private:
class RC4Key
{
public:
unsigned char state[256];
unsigned char x;
unsigned char y;
};
RC4Key key;
};
#endif // __RC4_HH__