From 5da146c8b53bb5a12c514f83fb52265e4922b5e1 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 24 Aug 2019 09:34:48 -0400 Subject: Track separately whether password was user/owner (fixes #159) --- include/qpdf/QPDF.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 5fae5a57..c488e0b1 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -406,6 +406,12 @@ class QPDF encryption_method_e& string_method, encryption_method_e& file_method); + QPDF_DLL + bool ownerPasswordMatched() const; + + QPDF_DLL + bool userPasswordMatched() const; + // Encryption permissions -- not enforced by QPDF QPDF_DLL bool allowAccessibility(); @@ -756,6 +762,8 @@ class QPDF std::string cached_object_encryption_key; int cached_key_objid; int cached_key_generation; + bool user_password_matched; + bool owner_password_matched; }; class ForeignStreamData -- cgit v1.2.3-70-g09d2