Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp

Issue 1773103003: Split off CPDF_Parser and CPDF_SimpleParser into .h/.cpp files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Then address C#3. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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" 7 #include "core/include/fpdfapi/fpdf_parser.h"
8 8
9 #include <time.h> 9 #include <time.h>
10 10
11 #include "core/include/fpdfapi/cpdf_parser.h"
12 #include "core/include/fpdfapi/cpdf_simple_parser.h"
11 #include "core/include/fdrm/fx_crypt.h" 13 #include "core/include/fdrm/fx_crypt.h"
12 14
13 const uint8_t defpasscode[32] = { 15 const uint8_t defpasscode[32] = {
14 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 16 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e,
15 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 17 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68,
16 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a}; 18 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a};
17 void CalcEncryptKey(CPDF_Dictionary* pEncrypt, 19 void CalcEncryptKey(CPDF_Dictionary* pEncrypt,
18 const uint8_t* password, 20 const uint8_t* password,
19 FX_DWORD pass_size, 21 FX_DWORD pass_size,
20 uint8_t* key, 22 uint8_t* key,
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 str = dest_buf; 1029 str = dest_buf;
1028 } 1030 }
1029 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() { 1031 CPDF_StandardCryptoHandler::CPDF_StandardCryptoHandler() {
1030 m_pAESContext = NULL; 1032 m_pAESContext = NULL;
1031 m_Cipher = FXCIPHER_NONE; 1033 m_Cipher = FXCIPHER_NONE;
1032 m_KeyLen = 0; 1034 m_KeyLen = 0;
1033 } 1035 }
1034 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() { 1036 CPDF_StandardCryptoHandler::~CPDF_StandardCryptoHandler() {
1035 FX_Free(m_pAESContext); 1037 FX_Free(m_pAESContext);
1036 } 1038 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698