From 332ef5423df9aa7a28166907f4a6ac8ac095163d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 5 May 2017 17:08:07 -0700 Subject: 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 Reviewed-by: Lei Zhang --- core/fpdfapi/parser/cpdf_crypto_handler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/fpdfapi/parser/cpdf_crypto_handler.h') 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 + +#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 m_pAESContext; }; #endif // CORE_FPDFAPI_PARSER_CPDF_CRYPTO_HANDLER_H_ -- cgit v1.2.3