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

Side by Side Diff: core/include/fpdfapi/ipdf_crypto_handler.h

Issue 1782673002: Split off IPDF_CryptoHandler into its own .cpp/.h files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move virtual dtor to .cpp file. 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
« no previous file with comments | « core/include/fpdfapi/fpdf_serial.h ('k') | core/include/fpdfapi/ipdf_security_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_INCLUDE_FPDFAPI_IPDF_CRYPTO_HANDLER_H_
8 #define CORE_INCLUDE_FPDFAPI_IPDF_CRYPTO_HANDLER_H_
9
10 #include "core/include/fxcrt/fx_basic.h"
11
12 class CPDF_Dictionary;
13 class IPDF_SecurityHandler;
14
15 class IPDF_CryptoHandler {
16 public:
17 virtual ~IPDF_CryptoHandler();
18
19 virtual FX_BOOL Init(CPDF_Dictionary* pEncryptDict,
20 IPDF_SecurityHandler* pSecurityHandler) = 0;
21
22 virtual FX_DWORD DecryptGetSize(FX_DWORD src_size) = 0;
23 virtual void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum) = 0;
24 virtual FX_BOOL DecryptStream(void* context,
25 const uint8_t* src_buf,
26 FX_DWORD src_size,
27 CFX_BinaryBuf& dest_buf) = 0;
28
29 virtual FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) = 0;
30 virtual FX_DWORD EncryptGetSize(FX_DWORD objnum,
31 FX_DWORD version,
32 const uint8_t* src_buf,
33 FX_DWORD src_size) = 0;
34
35 virtual FX_BOOL EncryptContent(FX_DWORD objnum,
36 FX_DWORD version,
37 const uint8_t* src_buf,
38 FX_DWORD src_size,
39 uint8_t* dest_buf,
40 FX_DWORD& dest_size) = 0;
41
42 void Decrypt(FX_DWORD objnum, FX_DWORD version, CFX_ByteString& str);
43 };
44
45 #endif // CORE_INCLUDE_FPDFAPI_IPDF_CRYPTO_HANDLER_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_serial.h ('k') | core/include/fpdfapi/ipdf_security_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698