summaryrefslogtreecommitdiffstats
path: root/qpdf/qpdf.cc
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 /qpdf/qpdf.cc
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 'qpdf/qpdf.cc')
-rw-r--r--qpdf/qpdf.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc
index c54504b8..c614b5bf 100644
--- a/qpdf/qpdf.cc
+++ b/qpdf/qpdf.cc
@@ -146,6 +146,8 @@ These options can be useful for digging into PDF files or for use in\n\
automated test suites for software that uses the qpdf library.\n\
\n\
--static-id generate static /ID: FOR TESTING ONLY!\n\
+--static-aes-iv use a static initialization vector for AES-CBC\n\
+ This is option is not secure! FOR TESTING ONLY!\n\
--no-original-object-ids suppress original object ID comments in qdf mode\n\
--show-encryption quickly show encryption parameters\n\
--check-linearization check file integrity and linearization status\n\
@@ -604,6 +606,7 @@ int main(int argc, char* argv[])
std::string force_version;
bool static_id = false;
+ bool static_aes_iv = false;
bool suppress_original_object_id = false;
bool show_encryption = false;
bool check_linearization = false;
@@ -758,6 +761,10 @@ int main(int argc, char* argv[])
{
static_id = true;
}
+ else if (strcmp(arg, "static-aes-iv") == 0)
+ {
+ static_aes_iv = true;
+ }
else if (strcmp(arg, "no-original-object-ids") == 0)
{
suppress_original_object_id = true;
@@ -1049,6 +1056,10 @@ int main(int argc, char* argv[])
{
w.setStaticID(true);
}
+ if (static_aes_iv)
+ {
+ w.setStaticAesIV(true);
+ }
if (suppress_original_object_id)
{
w.setSuppressOriginalObjectIDs(true);