PoDoFo 0.9.20
Public Member Functions | List of all members
PoDoFo::PdfEncryptAESV2 Class Reference

#include <PdfEncrypt.h>

Inheritance diagram for PoDoFo::PdfEncryptAESV2:
PoDoFo::PdfEncryptAESBase

Public Member Functions

std::unique_ptr< InputStreamCreateEncryptionInputStream (InputStream &inputStream, size_t inputLen, const PdfReference &objref) override
 
std::unique_ptr< OutputStreamCreateEncryptionOutputStream (OutputStream &outputStream, const PdfReference &objref) override
 
size_t CalculateStreamOffset () const override
 
size_t CalculateStreamLength (size_t length) const override
 

Detailed Description

A class that is used to encrypt a PDF file (AES-128)

Client code is working only with PdfEncrypt class and knows nothing about PdfEncryptAES*, it is created through CreatePdfEncrypt factory method

Member Function Documentation

◆ CalculateStreamLength()

size_t PdfEncryptAESV2::CalculateStreamLength ( size_t  length) const
overridevirtual

Calculate stream size

Implements PoDoFo::PdfEncrypt.

◆ CalculateStreamOffset()

size_t PdfEncryptAESV2::CalculateStreamOffset ( ) const
overridevirtual

Calculate stream offset

Implements PoDoFo::PdfEncrypt.

◆ CreateEncryptionInputStream()

unique_ptr< InputStream > PdfEncryptAESV2::CreateEncryptionInputStream ( InputStream inputStream,
size_t  inputLen,
const PdfReference objref 
)
overridevirtual

Create an InputStream that decrypts all data read from it using the current settings of the PdfEncrypt object.

Warning: Currently only RC4 based encryption is supported using output streams!

Parameters
inputStreamthe created InputStream reads all decrypted data to this input stream.
Returns
an InputStream that decrypts all data.

Implements PoDoFo::PdfEncrypt.

◆ CreateEncryptionOutputStream()

unique_ptr< OutputStream > PdfEncryptAESV2::CreateEncryptionOutputStream ( OutputStream outputStream,
const PdfReference objref 
)
overridevirtual

Create an OutputStream that encrypts all data written to it using the current settings of the PdfEncrypt object.

Warning: Currently only RC4 based encryption is supported using output streams!

Parameters
outputStreamthe created OutputStream writes all encrypted data to this output stream.
Returns
a OutputStream that encrypts all data.

Implements PoDoFo::PdfEncrypt.