From a7b0aec2cf2222e00b5c748bb6b9da308b5ba1b5 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 29 Jan 2022 12:50:31 -0500 Subject: Fix false compiler warning in debug mode --- libqpdf/QPDF_encryption.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libqpdf') 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(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(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) + -- cgit v1.2.3-54-g00ecf