Public Member Functions

PoDoFo::PdfEncryptAES Class Reference

#include <PdfEncrypt.h>

Inheritance diagram for PoDoFo::PdfEncryptAES:
PoDoFo::PdfEncrypt

List of all members.

Public Member Functions

void Encrypt (unsigned char *str, pdf_long len) const
 Encrypt a character string.
pdf_long CalculateStreamOffset () const
 Calculate stream offset.
PdfInputStreamCreateEncryptionInputStream (PdfInputStream *pInputStream)
PdfOutputStreamCreateEncryptionOutputStream (PdfOutputStream *pOutputStream)
pdf_long CalculateStreamLength (pdf_long length) const
 Calculate stream size.
void CreateEncryptionDictionary (PdfDictionary &rDictionary) const

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

void PoDoFo::PdfEncryptAES::CreateEncryptionDictionary ( PdfDictionary &  rDictionary  )  const [virtual]

Fill all keys into a encryption dictionary. This dictionary is usually added to the PDF files trailer under the /Encryption key.

Parameters:
rDictionary an empty dictionary which is filled with information about the used encryption algorithm

Implements PoDoFo::PdfEncrypt.

PdfInputStream * PoDoFo::PdfEncryptAES::CreateEncryptionInputStream ( PdfInputStream pInputStream  )  [virtual]

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

Implements PoDoFo::PdfEncrypt.

PdfOutputStream * PoDoFo::PdfEncryptAES::CreateEncryptionOutputStream ( PdfOutputStream pOutputStream  )  [virtual]

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:
pOutputStream the created PdfOutputStream writes all encrypted data to this output stream.
Returns:
a PdfOutputStream that encryts all data.

Implements PoDoFo::PdfEncrypt.