summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_dictionary.cpp
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-10-02 19:19:28 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-10-02 16:29:30 +0000
commitd8169d7607b5084cdeceee3eaffca0ab16d2c14d (patch)
tree7741388e44b50f8a330f4724fa5ce29d6a0097bf /core/fpdfapi/parser/cpdf_dictionary.cpp
parent73784e81928a664169f0ae013707fdfb0e82e70d (diff)
downloadpdfium-d8169d7607b5084cdeceee3eaffca0ab16d2c14d.tar.xz
Implement CPDF_CryptoHandler::DecryptObject
Decryption logic has been extracted from CPDF_SyntaxParser::GetObjectBody into CPDF_CryptoHandler::DecryptObject Performance comparison results: https://pdfium-review.googlesource.com/c/pdfium/+/12970 Change-Id: Iaeaed56b7f96166bbbcf6db162192d2ba9af4698 Reviewed-on: https://pdfium-review.googlesource.com/12971 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_dictionary.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 5cdcf34f81..1e7f6a9a9b 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -11,6 +11,7 @@
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_boolean.h"
+#include "core/fpdfapi/parser/cpdf_crypto_handler.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
@@ -167,10 +168,7 @@ bool CPDF_Dictionary::KeyExist(const ByteString& key) const {
}
bool CPDF_Dictionary::IsSignatureDict() const {
- CPDF_Object* pType = GetDirectObjectFor("Type");
- if (!pType)
- pType = GetDirectObjectFor("FT");
- return pType && pType->GetString() == "Sig";
+ return CPDF_CryptoHandler::IsSignatureDictionary(this);
}
CPDF_Object* CPDF_Dictionary::SetFor(const ByteString& key,