diff options
author | Jay Berkenbilt <ejb@ql.org> | 2008-04-29 14:55:25 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2008-04-29 14:55:25 +0200 |
commit | 9a0b88bf7777c153dc46ace22db74ef24d51583a (patch) | |
tree | f567ac1cf2bf5071a611eb49323a935b6ac938ff /libqpdf/qpdf/RC4.hh | |
download | qpdf-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/RC4.hh')
-rw-r--r-- | libqpdf/qpdf/RC4.hh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libqpdf/qpdf/RC4.hh b/libqpdf/qpdf/RC4.hh new file mode 100644 index 00000000..657bf35b --- /dev/null +++ b/libqpdf/qpdf/RC4.hh @@ -0,0 +1,26 @@ + +#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__ |