SetCryptFilterConfiguration

Security, Attachments

คำอธิบาย

เลือกอย่างเป็น atomic ว่ากลุ่มวัตถุ PDF ใดใช้ crypt filter มาตรฐานของเอกสารระหว่างการเข้ารหัสครั้งถัดไป

ไวยากรณ์

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

พารามิเตอร์

EncryptStrings1 เลือก filter มาตรฐานสำหรับ /StrF, 0 เลือก Identity
EncryptStreams1 เลือก filter มาตรฐานสำหรับสตรีมธรรมดาผ่าน /StmF, 0 เลือก Identity
EncryptEmbeddedFiles1 เลือก filter มาตรฐานสำหรับสตรีมไฟล์ฝังตัวผ่าน /EFF, 0 เลือก Identity

ค่าที่ส่งคืน

0ค่าไม่ใช่ศูนย์หรือหนึ่ง, เป้าหมายทั้งสามถูกปิดไว้, ไม่มีเอกสารที่เลือกอยู่ หรือการเข้ารหัสถูกเริ่มไปแล้ว
1ยอมรับการตั้งค่าเป้าหมายทั้งชุดแล้ว

Remarks

ค่าเริ่มต้นคือ 1, 1, 1 ซึ่งเข้ารหัสสตริง สตรีมธรรมดา และไฟล์ฝังตัว

การตั้งค่าแบบเลือกต้องการ AES-128, AES-256, AES-256 Acrobat X หรือ AES-256-GCM และถูกใช้อย่างสอดคล้องกันกับการเข้ารหัสด้วยรหัสผ่าน คีย์สาธารณะ และลายนิ้วมือ

เมธอด SetEncryptEmbeddedFilesOnly เดิมแม็ป 1 เป็น 0, 0, 1 และแม็ป 0 กลับเป็น 1, 1, 1

ตัวอย่าง

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

ดูเพิ่มเติม

GetEncryptStrings, GetEncryptStreams, GetEncryptEmbeddedFiles, Encrypt, EncryptPublicKey