SetCryptFilterConfiguration

Security, Attachments

Description

Atomicky vyberie, ktoré triedy PDF objektov použijú počas ďalšej šifrovacej operácie štandardný crypt filter dokumentu

Syntax

Delphi

Function TPDFlib.SetCryptFilterConfiguration(EncryptStrings, EncryptStreams, EncryptEmbeddedFiles: Integer): Integer;

DLL

Function DLSetCryptFilterConfiguration(InstanceID, EncryptStrings, EncryptStreams, EncryptEmbeddedFiles: Integer): Integer; Stdcall;

ActiveX

Function PDFlib::SetCryptFilterConfiguration(EncryptStrings As Long, EncryptStreams As Long, EncryptEmbeddedFiles As Long) As Long

Parameters

EncryptStrings1 selects the standard filter for /StrF; 0 selects Identity
EncryptStreams1 selects the standard filter for ordinary streams through /StmF; 0 selects Identity
EncryptEmbeddedFiles1 selects the standard filter for embedded-file streams through /EFF; 0 selects Identity

Return values

0A value is not zero or one, all three targets are disabled, no document is selected, or encryption has already begun
1The complete target configuration was accepted

Remarks

The default is 1, 1, 1, which encrypts strings, ordinary streams, and embedded files

Selektívne konfigurácie vyžadujú AES-128, AES-256, AES-256 Acrobat X alebo AES-256-GCM a aplikujú sa konzistentne na šifrovanie heslom, verejným kľúčom a fingerprint

The established SetEncryptEmbeddedFilesOnly method maps 1 to 0, 0, 1 and maps 0 back to 1, 1, 1

Example

PDF.SetCryptFilterConfiguration(0, 1, 0);
PDF.Encrypt('owner-password', 'user-password', 2, Permissions);
PDF.SaveToFile('selective-encryption.pdf');

See also

GetEncryptStrings, GetEncryptStreams, GetEncryptEmbeddedFiles, Encrypt, EncryptPublicKey