#include <PdfEncrypt.h>
Public Member Functions | |
virtual PdfInputStream * | CreateEncryptionInputStream (PdfInputStream *pInputStream) |
virtual PdfOutputStream * | CreateEncryptionOutputStream (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. |
Client code is working only with PdfEncrypt class and knows nothing about PdfEncryptAES*, it is created through CreatePdfEncrypt factory method
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!
pInputStream | the created PdfInputStream reads all decrypted data to this input stream. |
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!
pOutputStream | the created PdfOutputStream writes all encrypted data to this output stream. |
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
password | owner or user password | |
documentId | the documentId of the PDF file |
Implements PoDoFo::PdfEncrypt.
virtual void PoDoFo::PdfEncryptAESV2::GenerateEncryptionKey | ( | const PdfString & | documentId | ) | [virtual] |
Generate encryption key from user and owner passwords and protection key
documentId | the documentId of the current document |
Implements PoDoFo::PdfEncrypt.