PoDoFo
1.0.0-dev
|
A class that is used to encrypt a PDF file (AES-128) More...
#include <PdfEncrypt.h>
Inherits PoDoFo::PdfEncryptMD5Base.
Public Member Functions | |
std::unique_ptr< InputStream > | CreateEncryptionInputStream (InputStream &inputStream, size_t inputLen, PdfEncryptContext &context, const PdfReference &objref) const override |
Create an InputStream that decrypts all data read from it using the current settings of the PdfEncrypt object. More... | |
std::unique_ptr< OutputStream > | CreateEncryptionOutputStream (OutputStream &outputStream, PdfEncryptContext &context, const PdfReference &objref) const override |
Create an OutputStream that encrypts all data written to it using the current settings of the PdfEncrypt object. More... | |
size_t | CalculateStreamOffset () const override |
Calculate stream offset. | |
size_t | CalculateStreamLength (size_t length) const override |
Calculate stream size. | |
Protected Member Functions | |
void | Encrypt (const char *inStr, size_t inLen, PdfEncryptContext &context, const PdfReference &objref, char *outStr, size_t outLen) const override |
void | Decrypt (const char *inStr, size_t inLen, PdfEncryptContext &context, const PdfReference &objref, char *outStr, size_t &outLen) const override |
void | GenerateEncryptionKey (const std::string_view &documentId, PdfAuthResult authResult, PODOFO_CRYPT_CTX *ctx, unsigned char uValue[48], unsigned char oValue[48], unsigned char encryptionKey[32]) override |
PdfAuthResult | Authenticate (const std::string_view &password, const std::string_view &documentId, PODOFO_CRYPT_CTX *ctx, unsigned char encryptionKey[32]) const override |
Friends | |
class | PdfEncrypt |
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
|
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!
inputStream | the created InputStream reads all decrypted data to this input stream. |
Implements PoDoFo::PdfEncrypt.
|
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!
outputStream | the created OutputStream writes all encrypted data to this output stream. |
Implements PoDoFo::PdfEncrypt.