From 569d74d36ba287b6951687ee1bdea45ae19091f8 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 14 Jan 2018 10:17:17 -0500 Subject: 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 for the idea and contribution of one implementation of this idea. --- libqpdf/QPDF.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libqpdf/QPDF.cc') 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), @@ -171,6 +172,12 @@ QPDF::processInputSource(PointerHolder source, parse(password); } +void +QPDF::setPasswordIsHexKey(bool val) +{ + this->m->provided_password_is_hex_key = val; +} + void QPDF::emptyPDF() { -- cgit v1.2.3-54-g00ecf