5#ifndef PDFTRON_H_CPPSDFSecurityHandler
6#define PDFTRON_H_CPPSDFSecurityHandler
299 operator bool () {
return mp_handler!=0;}
432 TRN_SecurityHandler mp_handler;
443#include <Impl/SDFDoc.inl>
@ e_RC4_128
128-bit RC4 algorithm.
@ e_AES
Use Crypt filters with 128-bit AES (Advanced Encryption Standard) algorithm.
@ e_AES_256
Use Crypt filters with 256-bit AES (Advanced Encryption Standard) algorithm.
@ e_RC4_40
40-bit RC4 algorithm.
void ChangeUserPassword(const pdftron::UString &password)
@ e_doc_modify
edit the document more than adding or modifying text notes.
@ e_access_support
content access for the visually impaired.
@ e_owner
the user has 'owner' rights (e.g. rights to change the document's security settings).
@ e_print_high
high resolution print.
@ e_extract_content
enable content extraction
@ e_mod_annot
allow modifications to annotations
@ e_assemble_doc
allow document assembly
@ e_fill_forms
allow changes to fill in forms
@ e_doc_open
open and decrypt the document.
@ e_print
print the document.
const char * GetUserPassword()
void ChangeUserPasswordASCII(const char *password)
SecurityHandler(const SecurityHandler &s)
SecurityHandler(const char *name, int key_len, int enc_code)
bool IsUserPasswordRequired()
SecurityHandler * GetDerived() const
void ChangeRevisionNumber(int rev_num)
bool GetPermission(Permission p)
void SetEncryptMetadata(bool encrypt_metadata)
size_t GetMasterPasswordSize() const
void ChangeUserPassword(const char *password, size_t pwd_length)
void InitPasswordASCII(const char *password)
virtual bool EditSecurityData(SDFDoc &doc)
void ChangeUserPassword(const std::vector< pdftron::UInt8 > &password_buf)
virtual void AuthorizeFailed()
virtual SecurityHandler * Clone(TRN_SecurityHandler base) const
void ChangeMasterPassword(const pdftron::UString &password)
int GetEncryptionAlgorithmID() const
virtual bool Authorize(Permission p)
virtual Obj FillEncryptDict(class SDFDoc &doc)
bool IsMasterPasswordRequired()
size_t GetUserPasswordSize() const
void ChangeMasterPasswordASCII(const char *password)
void SetPermission(Permission perm, bool value)
const char * GetMasterPassword()
void ChangeMasterPassword(const char *password, size_t pwd_length)
virtual ~SecurityHandler()
SecurityHandler(AlgorithmType crypt_type)
virtual bool GetAuthorizationData(Permission req_opr)
bool IsAES(Obj stream) const
void InitPassword(const std::vector< pdftron::UInt8 > &password_buf)
void ChangeMasterPassword(const std::vector< pdftron::UInt8 > &password_buf)
const char * GetHandlerDocName() const
SecurityHandler & operator=(const SecurityHandler &)
void InitPassword(const pdftron::UString &password)
void SetModified(bool is_modified=true)
void InitPassword(const char *password, size_t pwd_length)
void SetDerived(UInt32 overloaded_funct)