EnablePubKeyEncryption 會使用 /Filter /Adobe.PubSec 輸出 /Encrypt dictionary。HotPDF 會處理 symmetric file encryption 與 PDF algorithm 9 key derivation,而 caller 則提供 random seed 以及每個 recipient 一個 externally built PKCS#7 envelopedData blob

THotPDF

 

方法  下一頁  CryptKeyLength

Switches document encryption to the PDF public-key security handler.

 

Delphi 語法:

procedure EnablePubKeyEncryption(const Seed: AnsiString; KeyType: THPDFKeyType = aes128; EncryptMetadata: Boolean = true);

 

C++ 語法:

void __fastcall EnablePubKeyEncryption(System::AnsiString Seed, THPDFKeyType KeyType, bool EncryptMetadata);

 

說明

EnablePubKeyEncryption 會輸出使用 /Filter /Adobe.PubSec 的 /Encrypt dictionary。HotPDF 會處理 symmetric file encryption 與 PDF algorithm 9 key derivation,而呼叫端需提供 random seed,以及每個 recipient 一個 externally built PKCS#7 envelopedData blob

 

此方法後,請為每個 recipient 使用 AddPubKeyRecipient。寫入檔案前請將 ActivateProtection 設為 true。支援的 KeyType values 是 k40、k128 與 aes128;尚未實作 AES-256 public-key encryption

 

請參閱: AddPubKeyRecipient, CryptKeyLength, ActivateProtection, PDF 篩選器支援