aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-11-04 15:04:25 +0100
committerJay Berkenbilt <ejb@ql.org>2019-11-09 14:18:02 +0100
commit4287fcc002488327ddea203365410a2361ae1e0b (patch)
tree45009d3f5aad477c582c9fcecde3a126bf2eb8c4 /include
parent0cdcd10228b1845a1c66ba97527e612eed1f5e2f (diff)
downloadqpdf-4287fcc002488327ddea203365410a2361ae1e0b.tar.zst
RC4: switch to pluggable crypto
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFCryptoImpl.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qpdf/QPDFCryptoImpl.hh b/include/qpdf/QPDFCryptoImpl.hh
index 8fa8b21e..b19f0112 100644
--- a/include/qpdf/QPDFCryptoImpl.hh
+++ b/include/qpdf/QPDFCryptoImpl.hh
@@ -50,6 +50,16 @@ class QPDF_DLL_CLASS QPDFCryptoImpl
virtual void MD5_finalize() = 0;
QPDF_DLL
virtual void MD5_digest(MD5_Digest) = 0;
+
+ // key_len of -1 means treat key_data as a null-terminated string
+ QPDF_DLL
+ virtual void RC4_init(unsigned char const* key_data, int key_len = -1) = 0;
+ // out_data = 0 means to encrypt/decrypt in place
+ QPDF_DLL
+ virtual void RC4_process(unsigned char* in_data, size_t len,
+ unsigned char* out_data = 0) = 0;
+ QPDF_DLL
+ virtual void RC4_finalize() = 0;
};
#endif // QPDFCRYPTOIMPL_HH