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

#include <PdfEncrypt.h>

Inheritance diagram for mm::PdfEncryptAESV2:
mm::PdfEncryptAESBase

Public Member Functions

std::unique_ptr< PdfInputStreamCreateEncryptionInputStream (PdfInputStream &inputStream, size_t inputLen) override
 
std::unique_ptr< PdfOutputStreamCreateEncryptionOutputStream (PdfOutputStream &outputStream) 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 mm::PdfEncrypt.

◆ CalculateStreamOffset()

size_t PdfEncryptAESV2::CalculateStreamOffset ( ) const
overridevirtual

Calculate stream offset

Implements mm::PdfEncrypt.

◆ CreateEncryptionInputStream()

unique_ptr< PdfInputStream > PdfEncryptAESV2::CreateEncryptionInputStream ( PdfInputStream inputStream,
size_t  inputLen 
)
overridevirtual

Create a PdfInputStream 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 PdfInputStream reads all decrypted data to this input stream.
Returns
a PdfInputStream that decrypts all data.

Implements mm::PdfEncrypt.

◆ CreateEncryptionOutputStream()

unique_ptr< PdfOutputStream > PdfEncryptAESV2::CreateEncryptionOutputStream ( PdfOutputStream outputStream)
overridevirtual

Create a PdfOutputStream 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 PdfOutputStream writes all encrypted data to this output stream.
Returns
a PdfOutputStream that encrypts all data.

Implements mm::PdfEncrypt.