Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDF_CryptoHandler Class Reference

#include <cpdf_crypto_handler.h>

+ Collaboration diagram for CPDF_CryptoHandler:

Public Types

enum class  Cipher { kNone = 0 , kRC4 = 1 , kAES = 2 , kAES2 = 3 }
 

Public Member Functions

 CPDF_CryptoHandler (Cipher cipher, const uint8_t *key, size_t keylen)
 
 ~CPDF_CryptoHandler ()
 
bool DecryptObjectTree (RetainPtr< CPDF_Object > object)
 
size_t EncryptGetSize (pdfium::span< const uint8_t > source) const
 
void EncryptContent (uint32_t objnum, uint32_t gennum, pdfium::span< const uint8_t > source, uint8_t *dest_buf, size_t &dest_size) const
 
bool IsCipherAES () const
 

Static Public Member Functions

static bool IsSignatureDictionary (const CPDF_Dictionary *dictionary)
 

Detailed Description

Definition at line 25 of file cpdf_crypto_handler.h.

Member Enumeration Documentation

◆ Cipher

enum class CPDF_CryptoHandler::Cipher
strong
Enumerator
kNone 
kRC4 
kAES 
kAES2 

Definition at line 27 of file cpdf_crypto_handler.h.

Constructor & Destructor Documentation

◆ CPDF_CryptoHandler()

CPDF_CryptoHandler::CPDF_CryptoHandler ( Cipher cipher,
const uint8_t * key,
size_t keylen )

Definition at line 316 of file cpdf_crypto_handler.cpp.

References CPDF_CryptoHandler().

Referenced by CPDF_CryptoHandler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~CPDF_CryptoHandler()

CPDF_CryptoHandler::~CPDF_CryptoHandler ( )
default

Member Function Documentation

◆ DecryptObjectTree()

bool CPDF_CryptoHandler::DecryptObjectTree ( RetainPtr< CPDF_Object > object)

Definition at line 230 of file cpdf_crypto_handler.cpp.

References CPDF_ObjectWalker::dictionary_key(), CPDF_String::GetString(), IsCipherAES(), IsSignatureDictionary(), pdfium::form_fields::kFT, CPDF_Stream::SetData(), CPDF_String::SetString(), and CPDF_ObjectWalker::SkipWalkIntoCurrentObject().

+ Here is the call graph for this function:

◆ EncryptContent()

void CPDF_CryptoHandler::EncryptContent ( uint32_t objnum,
uint32_t gennum,
pdfium::span< const uint8_t > source,
uint8_t * dest_buf,
size_t & dest_size ) const

Definition at line 48 of file cpdf_crypto_handler.cpp.

References kAES, and kNone.

◆ EncryptGetSize()

size_t CPDF_CryptoHandler::EncryptGetSize ( pdfium::span< const uint8_t > source) const

Definition at line 311 of file cpdf_crypto_handler.cpp.

References kAES.

◆ IsCipherAES()

bool CPDF_CryptoHandler::IsCipherAES ( ) const

Definition at line 226 of file cpdf_crypto_handler.cpp.

References kAES.

Referenced by DecryptObjectTree().

+ Here is the caller graph for this function:

◆ IsSignatureDictionary()

bool CPDF_CryptoHandler::IsSignatureDictionary ( const CPDF_Dictionary * dictionary)
static

Definition at line 37 of file cpdf_crypto_handler.cpp.

References CPDF_Dictionary::GetDirectObjectFor(), pdfium::form_fields::kFT, and pdfium::form_fields::kSig.

Referenced by DecryptObjectTree(), and CPDF_Dictionary::WriteTo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: