THPDFKeyType Type

Selects the PDF security handler algorithm and key length used when encrypting a document

Declaration

THPDFKeyType= (k40, k128, aes128, aes256, aesgcm);

Unit

HPDFDoc

Values

ValueMeaning
k40RC4 40-bit, V=1 R=2 (PDF 1.1+)
k128RC4 128-bit, V=2 R=3 (PDF 1.4+)
aes128AES-128, V=4 R=4 with crypt filter CFM=AESV2 (PDF 1.6+)
aes256AES-256, V=5 R=5 with crypt filter CFM=AESV3 (Adobe Extension Level 3 / PDF 1.7+; recognised by Acrobat 9+)
aesgcmAES-256-GCM, V=6 R=7 with crypt filter CFM=AESV4 (ISO/TS 32003:2023 developer extension for PDF 2.0)

Usage notes

Related APIs