EncryptPublicKey

安全與簽章

描述

以擱置中的收件者憑證與權限群組,為所選文件設定 Adobe.PubSec 公開金鑰加密

語法

Delphi

Function TPDFlib.EncryptPublicKey(Strength: Integer): Integer;

ActiveX

Function PDFlib::EncryptPublicKey(Strength As Long) As Long

DLL

int DLEncryptPublicKey(int InstanceID, int Strength);

參數

StrengthAES-128 搭配 AESV2 用 2;AES-256 搭配 AESV3 用 3

傳回值

1Public-key encryption was configured
0未設定收件者、強度不受支援,或文件狀態不相容

備註

輸出使用 /Filter /Adobe.PubSec、/SubFilter /adbe.pkcs7.s5、CMS EnvelopedData,以及每個群組各自的權限承載

PDF MAC 與僅內嵌檔案加密無法與此操作併用

另見

AddPublicKeyRecipientFromFile, SetPublicKeyDecryptionPFX, GetPubSecStatus