From cb0a6be983b7e4ee2784991273777579dcb90b9d Mon Sep 17 00:00:00 2001 From: m-holger Date: Wed, 13 Jul 2022 14:24:19 +0100 Subject: Code tidy: use QPDF::toS and QPDF::toI where possible --- libqpdf/QPDF_encryption.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libqpdf/QPDF_encryption.cc') diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc index 1042d04b..2e5ddefb 100644 --- a/libqpdf/QPDF_encryption.cc +++ b/libqpdf/QPDF_encryption.cc @@ -422,11 +422,9 @@ QPDF::compute_encryption_key_from_password( md5.encodeDataIncrementally(bytes, 4); } MD5::Digest digest; - int key_len = - std::min(QIntC::to_int(sizeof(digest)), data.getLengthBytes()); + int key_len = std::min(toI(sizeof(digest)), data.getLengthBytes()); iterate_md5_digest(md5, digest, ((data.getR() >= 3) ? 50 : 0), key_len); - return std::string( - reinterpret_cast(digest), QIntC::to_size(key_len)); + return std::string(reinterpret_cast(digest), toS(key_len)); } static void -- cgit v1.2.3-54-g00ecf