summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_crypto_handler.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-05 17:08:07 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-06 00:23:07 +0000
commit332ef5423df9aa7a28166907f4a6ac8ac095163d (patch)
treeff0891147fb3cf505e337b3968bdd0c404530961 /core/fpdfapi/parser/cpdf_crypto_handler.h
parentf0ea70825a465ebb8979a7f6e70b0133be398f64 (diff)
downloadpdfium-332ef5423df9aa7a28166907f4a6ac8ac095163d.tar.xz
Remove type-unsafe void* / uint8_t* usage in fx_crypt.h
Consolidate all of the sha2 contexts while we're at it, the one with the largest buf is suitable for use by all the others. Change-Id: Iace6cd8ca4405f75f78842a1559c3a2478910218 Reviewed-on: https://pdfium-review.googlesource.com/4994 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_crypto_handler.h')
-rw-r--r--core/fpdfapi/parser/cpdf_crypto_handler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_crypto_handler.h b/core/fpdfapi/parser/cpdf_crypto_handler.h
index 24caff7081..9d76e67d96 100644
--- a/core/fpdfapi/parser/cpdf_crypto_handler.h
+++ b/core/fpdfapi/parser/cpdf_crypto_handler.h
@@ -7,8 +7,12 @@
#ifndef CORE_FPDFAPI_PARSER_CPDF_CRYPTO_HANDLER_H_
#define CORE_FPDFAPI_PARSER_CPDF_CRYPTO_HANDLER_H_
+#include <memory>
+
+#include "core/fdrm/crypto/fx_crypt.h"
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -68,7 +72,7 @@ class CPDF_CryptoHandler : public CFX_Retainable {
uint8_t m_EncryptKey[32];
int m_KeyLen;
int m_Cipher;
- uint8_t* m_pAESContext;
+ std::unique_ptr<CRYPT_aes_context, FxFreeDeleter> m_pAESContext;
};
#endif // CORE_FPDFAPI_PARSER_CPDF_CRYPTO_HANDLER_H_