summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_security_handler.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-10-03 19:10:04 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-10-03 18:16:55 +0000
commitb7fe3c6e8c9d332fc6d3ca55ec9f852ce162c5a1 (patch)
treeab4bd11602c77223192796230e785873061d8b6b /core/fpdfapi/parser/cpdf_security_handler.h
parente4289f69a28d26d14c94bcc0c0b8368dbc2f7e1c (diff)
downloadpdfium-b7fe3c6e8c9d332fc6d3ca55ec9f852ce162c5a1.tar.xz
Move the CryptoHandler into the SecurityHandler
Change-Id: Idb5928e65833641d0443d955e4f2866d0f94cf5f Reviewed-on: https://pdfium-review.googlesource.com/15291 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_security_handler.h')
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_security_handler.h b/core/fpdfapi/parser/cpdf_security_handler.h
index 8b55fa21a7..c03d97c411 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.h
+++ b/core/fpdfapi/parser/cpdf_security_handler.h
@@ -7,7 +7,8 @@
#ifndef CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_
#define CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_
-#include "core/fpdfapi/parser/cpdf_crypto_handler.h"
+#include <memory>
+
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -19,6 +20,7 @@
#define PDF_ENCRYPT_CONTENT 0
class CPDF_Array;
+class CPDF_CryptoHandler;
class CPDF_Dictionary;
class CPDF_Parser;
@@ -57,6 +59,11 @@ class CPDF_SecurityHandler {
uint8_t* key,
int key_len);
+ bool InitCryptoHandler();
+ CPDF_CryptoHandler* GetCryptoHandler() const {
+ return m_pCryptoHandler.get();
+ }
+
private:
bool LoadDict(CPDF_Dictionary* pEncryptDict);
bool LoadDict(CPDF_Dictionary* pEncryptDict,
@@ -107,6 +114,7 @@ class CPDF_SecurityHandler {
uint8_t m_EncryptKey[32];
int m_KeyLen;
bool m_bOwnerUnlocked;
+ std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
};
#endif // CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_