| 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 <time.h> | 7 #include <time.h> |
| 8 #include "../../../include/fpdfapi/fpdf_parser.h" | 8 #include "../../../include/fpdfapi/fpdf_parser.h" |
| 9 #include "../../../include/fdrm/fx_crypt.h" | 9 #include "../../../include/fdrm/fx_crypt.h" |
| 10 const uint8_t defpasscode[32] = { | 10 const uint8_t defpasscode[32] = { |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 DecryptStream(context, (const uint8_t*)str, str.GetLength(), dest_buf); | 1033 DecryptStream(context, (const uint8_t*)str, str.GetLength(), dest_buf); |
| 1034 DecryptFinish(context, dest_buf); | 1034 DecryptFinish(context, dest_buf); |
| 1035 str = dest_buf; | 1035 str = dest_buf; |
| 1036 } | 1036 } |
| 1037 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() { | 1037 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() { |
| 1038 m_pAESContext = NULL; | 1038 m_pAESContext = NULL; |
| 1039 m_Cipher = FXCIPHER_NONE; | 1039 m_Cipher = FXCIPHER_NONE; |
| 1040 m_KeyLen = 0; | 1040 m_KeyLen = 0; |
| 1041 } | 1041 } |
| 1042 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() { | 1042 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() { |
| 1043 if (m_pAESContext) { | |
| 1044 FX_Free(m_pAESContext); | 1043 FX_Free(m_pAESContext); |
| 1045 } | |
| 1046 } | 1044 } |
| OLD | NEW |