PoDoFo::PdfEncryptAESV2 Class Reference

#include <PdfEncrypt.h>

Inheritance diagram for PoDoFo::PdfEncryptAESV2:

PoDoFo::PdfEncryptAESBase

List of all members.

Public Member Functions

virtual PdfInputStreamCreateEncryptionInputStream (PdfInputStream *pInputStream)
virtual PdfOutputStreamCreateEncryptionOutputStream (PdfOutputStream *pOutputStream)
virtual bool Authenticate (const std::string &password, const PdfString &documentId)
virtual void Encrypt (const unsigned char *inStr, pdf_long inLen, unsigned char *outStr, pdf_long outLen) const
 Encrypt a character string.
virtual void Decrypt (const unsigned char *inStr, pdf_long inLen, unsigned char *outStr, pdf_long &outLen) const
 Decrypt a character string.
virtual void GenerateEncryptionKey (const PdfString &documentId)
virtual pdf_long CalculateStreamOffset () const
 Calculate stream offset.
virtual pdf_long CalculateStreamLength (pdf_long length) const
 Calculate stream size.


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

virtual PdfInputStream* PoDoFo::PdfEncryptAESV2::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.

virtual PdfOutputStream* PoDoFo::PdfEncryptAESV2::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.

virtual bool PoDoFo::PdfEncryptAESV2::Authenticate ( const std::string &  password,
const PdfString documentId 
) [virtual]

Tries to authenticate a user using either the user or owner password

Parameters:
password owner or user password
documentId the documentId of the PDF file
Returns:
true if either the owner or user password matches password

Implements PoDoFo::PdfEncrypt.

virtual void PoDoFo::PdfEncryptAESV2::GenerateEncryptionKey ( const PdfString documentId  )  [virtual]

Generate encryption key from user and owner passwords and protection key

Parameters:
documentId the documentId of the current document

Implements PoDoFo::PdfEncrypt.


Generated on Tue Nov 29 09:28:33 2016 for PoDoFo by  doxygen 1.5.6