| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h" | 7 #include "core/fpdfapi/fpdf_parser/cpdf_crypto_handler.h" |
| 8 | 8 |
| 9 #include <time.h> | 9 #include <time.h> |
| 10 | 10 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 FX_BOOL CPDF_CryptoHandler::EncryptContent(uint32_t objnum, | 321 FX_BOOL CPDF_CryptoHandler::EncryptContent(uint32_t objnum, |
| 322 uint32_t gennum, | 322 uint32_t gennum, |
| 323 const uint8_t* src_buf, | 323 const uint8_t* src_buf, |
| 324 uint32_t src_size, | 324 uint32_t src_size, |
| 325 uint8_t* dest_buf, | 325 uint8_t* dest_buf, |
| 326 uint32_t& dest_size) { | 326 uint32_t& dest_size) { |
| 327 CryptBlock(TRUE, objnum, gennum, src_buf, src_size, dest_buf, dest_size); | 327 CryptBlock(TRUE, objnum, gennum, src_buf, src_size, dest_buf, dest_size); |
| 328 return TRUE; | 328 return TRUE; |
| 329 } | 329 } |
| 330 CPDF_CryptoHandler::CPDF_CryptoHandler() { | 330 CPDF_CryptoHandler::CPDF_CryptoHandler() { |
| 331 m_pAESContext = NULL; | 331 m_pAESContext = nullptr; |
| 332 m_Cipher = FXCIPHER_NONE; | 332 m_Cipher = FXCIPHER_NONE; |
| 333 m_KeyLen = 0; | 333 m_KeyLen = 0; |
| 334 } | 334 } |
| 335 CPDF_CryptoHandler::~CPDF_CryptoHandler() { | 335 CPDF_CryptoHandler::~CPDF_CryptoHandler() { |
| 336 FX_Free(m_pAESContext); | 336 FX_Free(m_pAESContext); |
| 337 } | 337 } |
| OLD | NEW |