aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_encryption.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-29 18:50:31 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-31 21:57:45 +0100
commita7b0aec2cf2222e00b5c748bb6b9da308b5ba1b5 (patch)
tree587826a1450eee3e5c3dc84428b66e4b7a8e0b2e /libqpdf/QPDF_encryption.cc
parent28278e27ea2acd85da7b57dd39ffcfda47d26a80 (diff)
downloadqpdf-a7b0aec2cf2222e00b5c748bb6b9da308b5ba1b5.tar.zst
Fix false compiler warning in debug mode
Diffstat (limited to 'libqpdf/QPDF_encryption.cc')
-rw-r--r--libqpdf/QPDF_encryption.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index d5289ad3..2301cbb5 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -664,7 +664,7 @@ compute_U_UE_value_V5(std::string const& user_password,
// Algorithm 3.8 from the PDF 1.7 extension level 3
char k[16];
QUtil::initializeWithRandomBytes(
- QUtil::unsigned_char_pointer(k), sizeof(k));
+ reinterpret_cast<unsigned char*>(k), sizeof(k));
std::string validation_salt(k, 8);
std::string key_salt(k + 8, 8);
U = hash_V5(user_password, validation_salt, "", data) +
@@ -683,7 +683,7 @@ compute_O_OE_value_V5(std::string const& owner_password,
// Algorithm 3.9 from the PDF 1.7 extension level 3
char k[16];
QUtil::initializeWithRandomBytes(
- QUtil::unsigned_char_pointer(k), sizeof(k));
+ reinterpret_cast<unsigned char*>(k), sizeof(k));
std::string validation_salt(k, 8);
std::string key_salt(k + 8, 8);
O = hash_V5(owner_password, validation_salt, U, data) +