aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-19 02:36:51 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-19 02:36:51 +0200
commita8715c495b218c9b9388a2e20c8202a3fa73b2c1 (patch)
tree721a4a9c39d9c9fdf3a150cf64859c331d392fc2 /include
parent09175e457852c585a68a86d43280f7e0790a4a3b (diff)
downloadqpdf-a8715c495b218c9b9388a2e20c8202a3fa73b2c1.tar.zst
add C API for R4 encryption
git-svn-id: svn+q:///qpdf/trunk@825 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFWriter.hh5
-rw-r--r--include/qpdf/qpdf-c.h13
2 files changed, 18 insertions, 0 deletions
diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh
index e16c5f99..9d92ffbb 100644
--- a/include/qpdf/QPDFWriter.hh
+++ b/include/qpdf/QPDFWriter.hh
@@ -110,6 +110,11 @@ class DLL_EXPORT QPDFWriter
// suites.
void setStaticID(bool);
+ // Use a fixed initialization vector for AES-CBC encryption. This
+ // is not secure. It should be used only in test suites for
+ // creating predictable encrypted output.
+ void setStaticAesIV(bool);
+
// Suppress inclusion of comments indicating original object IDs
// when writing QDF files. This can also be useful for testing,
// particularly when using comparison of two qdf files to
diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h
index fab8112b..8c112ba5 100644
--- a/include/qpdf/qpdf-c.h
+++ b/include/qpdf/qpdf-c.h
@@ -226,6 +226,12 @@ extern "C" {
DLL_EXPORT
void qpdf_set_static_ID(qpdf_data qpdf, QPDF_BOOL value);
+ /* Never use qpdf_set_static_aes_IV except in test suites to
+ * create predictable AES encrypted output.
+ */
+ DLL_EXPORT
+ void qpdf_set_static_aes_IV(qpdf_data qpdf, QPDF_BOOL value);
+
DLL_EXPORT
void qpdf_set_suppress_original_object_IDs(
qpdf_data qpdf, QPDF_BOOL value);
@@ -259,6 +265,13 @@ extern "C" {
int print, int modify);
DLL_EXPORT
+ void qpdf_set_r4_encryption_parameters(
+ qpdf_data qpdf, char const* user_password, char const* owner_password,
+ QPDF_BOOL allow_accessibility, QPDF_BOOL allow_extract,
+ int print, int modify,
+ QPDF_BOOL encrypt_metadata, QPDF_BOOL use_aes);
+
+ DLL_EXPORT
void qpdf_set_linearization(qpdf_data qpdf, QPDF_BOOL value);
DLL_EXPORT