Commit bdceb0830458f656c10362a1b4cf10e8444c633e

Authored by m-holger
Committed by GitHub
2 parents 2ef866db beda26ed

Merge pull request #1491 from m-holger/hc

Deprecate QPDF::compute_encryption_key
README-maintainer.md
@@ -202,10 +202,10 @@ Building docs from pull requests is also enabled. @@ -202,10 +202,10 @@ Building docs from pull requests is also enabled.
202 * Debug code: #include <qpdf/assert_debug.h> first and use 202 * Debug code: #include <qpdf/assert_debug.h> first and use
203 qpdf_assert_debug instead of assert. Note that <qpdf/Util.hh> 203 qpdf_assert_debug instead of assert. Note that <qpdf/Util.hh>
204 includes assert_debug.h. Include this instead if 'At most one 204 includes assert_debug.h. Include this instead if 'At most one
205 - qpdf/assert header ...' errors are encounted, especially when 205 + qpdf/assert header ...' errors are encountered, especially when
206 using assert in private header files. 206 using assert in private header files.
207 * Use 'qpdf_expect', 'qpdf_static_expect', 'qpdf_ensures' and 207 * Use 'qpdf_expect', 'qpdf_static_expect', 'qpdf_ensures' and
208 - 'qpdf_ionvariant' to document pre/post-conditions and ivariants. 208 + 'qpdf_invariant' to document pre/post-conditions and invariants.
209 This requires inclusion of 'assert_debug.h' or 'Util.hh'. Remember 209 This requires inclusion of 'assert_debug.h' or 'Util.hh'. Remember
210 that these (except for 'qpdf_static_expect') are only checked in 210 that these (except for 'qpdf_static_expect') are only checked in
211 debug builds. 211 debug builds.
include/qpdf/QPDF.hh
@@ -438,6 +438,9 @@ class QPDF @@ -438,6 +438,9 @@ class QPDF
438 // Encryption support 438 // Encryption support
439 439
440 enum encryption_method_e { e_none, e_unknown, e_rc4, e_aes, e_aesv3 }; 440 enum encryption_method_e { e_none, e_unknown, e_rc4, e_aes, e_aesv3 };
  441 +
  442 + // To be removed from the public API in qpdf 13. See
  443 + // <https:manual.qpdf.org/release-notes.html#r12-3-0-deprecate>.
441 class EncryptionData 444 class EncryptionData
442 { 445 {
443 public: 446 public:
@@ -558,8 +561,10 @@ class QPDF @@ -558,8 +561,10 @@ class QPDF
558 bool use_aes, 561 bool use_aes,
559 int encryption_V, 562 int encryption_V,
560 int encryption_R); 563 int encryption_R);
561 - QPDF_DLL  
562 - static std::string 564 +
  565 + // To be removed in qpdf 13. See <https:manual.qpdf.org/release-notes.html#r12-3-0-deprecate>.
  566 + [[deprecated("to be removed in qpdf 13")]]
  567 + QPDF_DLL static std::string
563 compute_encryption_key(std::string const& password, EncryptionData const& data); 568 compute_encryption_key(std::string const& password, EncryptionData const& data);
564 569
565 QPDF_DLL 570 QPDF_DLL
manual/release-notes.rst
@@ -65,6 +65,15 @@ more detail. @@ -65,6 +65,15 @@ more detail.
65 65
66 - Other changes 66 - Other changes
67 67
  68 +.. _r12-3-0-deprecate:
  69 +
  70 + - The following are believed to be not in use and have been deprecated.
  71 + If you are relying on them please open a ticket_.
  72 +
  73 + - QPDF::compute_encryption_key
  74 + - All QPDF::EncryptionData methods. These methods are not exported in the
  75 + shared library and are only useable in statically linked programs.
  76 +
68 - Setting :qpdf:ref:`--compress-streams` to ``n`` or 77 - Setting :qpdf:ref:`--compress-streams` to ``n`` or
69 ``QPDFWriter::setCompressStreams(false)`` no longer automatically 78 ``QPDFWriter::setCompressStreams(false)`` no longer automatically
70 causes the outputfile to be decrypted. Set :qpdf:ref:`--decrypt` if this 79 causes the outputfile to be decrypted. Set :qpdf:ref:`--decrypt` if this