aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-01-14 16:17:17 +0100
committerJay Berkenbilt <ejb@ql.org>2018-01-14 16:21:05 +0100
commit569d74d36ba287b6951687ee1bdea45ae19091f8 (patch)
tree2a8e05610e45ddc16f86bd06eae926fa12087f44 /libqpdf/QPDF.cc
parent3e306ae64cc3d160034f27d72ad27bee03a65aa5 (diff)
downloadqpdf-569d74d36ba287b6951687ee1bdea45ae19091f8.tar.zst
Allow raw encryption key to be specified
Add options to enable the raw encryption key to be directly shown or specified. Thanks to Didier Stevens <didier.stevens@gmail.com> for the idea and contribution of one implementation of this idea.
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 33847a45..51a87d66 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -75,6 +75,7 @@ QPDF::QPDFVersion()
}
QPDF::Members::Members() :
+ provided_password_is_hex_key(false),
encrypted(false),
encryption_initialized(false),
ignore_xref_streams(false),
@@ -172,6 +173,12 @@ QPDF::processInputSource(PointerHolder<InputSource> source,
}
void
+QPDF::setPasswordIsHexKey(bool val)
+{
+ this->m->provided_password_is_hex_key = val;
+}
+
+void
QPDF::emptyPDF()
{
processMemoryFile("empty PDF", EMPTY_PDF, strlen(EMPTY_PDF));