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

Side by Side Diff: xfa/fxfa/xfa_checksum.h

Issue 2577223002: Better tests for password protected documents. (Closed)
Patch Set: revert pdfium_test Created 4 years 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 | « xfa/fxfa/app/xfa_checksum.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef XFA_FXFA_XFA_CHECKSUM_H_ 7 #ifndef XFA_FXFA_XFA_CHECKSUM_H_
8 #define XFA_FXFA_XFA_CHECKSUM_H_ 8 #define XFA_FXFA_XFA_CHECKSUM_H_
9 9
10 #include "core/fdrm/crypto/fx_crypt.h"
10 #include "xfa/fde/xml/cfx_saxreader.h" 11 #include "xfa/fde/xml/cfx_saxreader.h"
11 #include "xfa/fxfa/fxfa.h" 12 #include "xfa/fxfa/fxfa.h"
12 13
13 class CXFA_SAXReaderHandler; 14 class CXFA_SAXReaderHandler;
14 class CXFA_ChecksumContext; 15 class CXFA_ChecksumContext;
15 16
16 class CXFA_SAXContext { 17 class CXFA_SAXContext {
17 public: 18 public:
18 CXFA_SAXContext() : m_eNode(CFX_SAXItem::Type::Unknown) {} 19 CXFA_SAXContext() : m_eNode(CFX_SAXItem::Type::Unknown) {}
19 20
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void StartChecksum(); 64 void StartChecksum();
64 void Update(const CFX_ByteStringC& bsText); 65 void Update(const CFX_ByteStringC& bsText);
65 bool UpdateChecksum(const CFX_RetainPtr<IFX_SeekableReadStream>& pSrcFile, 66 bool UpdateChecksum(const CFX_RetainPtr<IFX_SeekableReadStream>& pSrcFile,
66 FX_FILESIZE offset = 0, 67 FX_FILESIZE offset = 0,
67 size_t size = 0); 68 size_t size = 0);
68 void FinishChecksum(); 69 void FinishChecksum();
69 CFX_ByteString GetChecksum() const; 70 CFX_ByteString GetChecksum() const;
70 71
71 protected: 72 protected:
72 CFX_SAXReader* m_pSAXReader; 73 CFX_SAXReader* m_pSAXReader;
73 uint8_t* m_pByteContext; 74 CRYPT_sha1_context* m_pByteContext;
74 CFX_ByteString m_bsChecksum; 75 CFX_ByteString m_bsChecksum;
75 }; 76 };
76 77
77 #endif // XFA_FXFA_XFA_CHECKSUM_H_ 78 #endif // XFA_FXFA_XFA_CHECKSUM_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_checksum.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698