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/include/fpdfapi/fpdf_parser.h" | |
Lei Zhang
2016/01/06 00:05:33
I moved this up here because it's the "related hea
Wei Li
2016/01/06 04:46:24
Got it. I apply this to other files as well.
| |
8 | |
9 #include <time.h> | 7 #include <time.h> |
10 | 8 |
11 #include "core/include/fdrm/fx_crypt.h" | 9 #include "core/include/fdrm/fx_crypt.h" |
10 #include "core/include/fpdfapi/fpdf_parser.h" | |
12 | 11 |
13 const uint8_t defpasscode[32] = { | 12 const uint8_t defpasscode[32] = { |
14 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, | 13 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, |
15 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, | 14 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, |
16 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a}; | 15 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a}; |
17 void CalcEncryptKey(CPDF_Dictionary* pEncrypt, | 16 void CalcEncryptKey(CPDF_Dictionary* pEncrypt, |
18 const uint8_t* password, | 17 const uint8_t* password, |
19 FX_DWORD pass_size, | 18 FX_DWORD pass_size, |
20 uint8_t* key, | 19 uint8_t* key, |
21 int keylen, | 20 int keylen, |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1029 str = dest_buf; | 1028 str = dest_buf; |
1030 } | 1029 } |
1031 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() { | 1030 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() { |
1032 m_pAESContext = NULL; | 1031 m_pAESContext = NULL; |
1033 m_Cipher = FXCIPHER_NONE; | 1032 m_Cipher = FXCIPHER_NONE; |
1034 m_KeyLen = 0; | 1033 m_KeyLen = 0; |
1035 } | 1034 } |
1036 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() { | 1035 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() { |
1037 FX_Free(m_pAESContext); | 1036 FX_Free(m_pAESContext); |
1038 } | 1037 } |
OLD | NEW |