PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfStatefulEncrypt.h
1// SPDX-FileCopyrightText: 2021 Francesco Pretto <ceztko@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef PDF_STATEFUL_ENCRYPT_H
5#define PDF_STATEFUL_ENCRYPT_H
6
7#include "PdfReference.h"
8#include "PdfEncrypt.h"
9
10namespace PoDoFo
11{
12 class PODOFO_API PdfStatefulEncrypt final
13 {
14 public:
15 PdfStatefulEncrypt(const PdfEncrypt& encrypt, PdfEncryptContext& context, const PdfReference& objref);
16
17 public:
19 void EncryptTo(charbuff& out, const bufferview& view) const;
20
22 void DecryptTo(charbuff& out, const bufferview& view) const;
23
24 size_t CalculateStreamLength(size_t length) const;
25
26 private:
27 PdfStatefulEncrypt(const PdfStatefulEncrypt&) = delete;
28 PdfStatefulEncrypt& operator=(const PdfStatefulEncrypt&) = delete;
29
30 private:
31 const PdfEncrypt* m_encrypt;
32 PdfEncryptContext* m_context;
33 PdfReference m_currReference; // Reference of the current PdfObject
34 };
35}
36
37#endif // PDF_STATEFUL_ENCRYPT_H
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13