aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_encryption.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-16 17:43:37 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-16 18:41:43 +0200
commit92d3cbecd4ea375d8de95bffc0fe8651c698f568 (patch)
treedcaed532423d2b836251d8203a14db594adca2be /libqpdf/QPDF_encryption.cc
parent66198f447f45a87718b6457756976baa8defb2fd (diff)
downloadqpdf-92d3cbecd4ea375d8de95bffc0fe8651c698f568.tar.zst
Fix warnings reported by -Wshadow=local (fixes #431)
Diffstat (limited to 'libqpdf/QPDF_encryption.cc')
-rw-r--r--libqpdf/QPDF_encryption.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index 9880face..48351122 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -322,10 +322,10 @@ hash_V5(std::string const& password,
int next_hash = ((E_mod_3 == 0) ? 256 :
(E_mod_3 == 1) ? 384 :
512);
- Pl_SHA2 hash(next_hash);
- hash.write(QUtil::unsigned_char_pointer(E), E.length());
- hash.finish();
- K = hash.getRawDigest();
+ Pl_SHA2 sha2(next_hash);
+ sha2.write(QUtil::unsigned_char_pointer(E), E.length());
+ sha2.finish();
+ K = sha2.getRawDigest();
if (round_number >= 64)
{