SetPublicKeyDecryptionPFX

安全與簽章

描述

設定後續 LoadFromFile、LoadFromStream 與 LoadFromString 呼叫使用的 PKCS #12 PFX 憑證

語法

Delphi

Function TPDFlib.SetPublicKeyDecryptionPFX(Const PFXFileName, PFXPassword: WideString; UseMachineKeyset: Integer): Integer;

ActiveX

Function PDFlib::SetPublicKeyDecryptionPFX(PFXFileName As String, PFXPassword As String, UseMachineKeyset As Long) As Long

DLL

int DLSetPublicKeyDecryptionPFX(int InstanceID, const wchar_t* PFXFileName, const wchar_t* PFXPassword, int UseMachineKeyset);

參數

PFXFileName含收件者私密金鑰的 PFX 路徑
PFXPassword保護 PFX 的密碼
UseMachineKeyset機器金鑰組用非零值;使用者金鑰組用零

傳回值

1憑證已驗證並保留
0PFX 或密碼無效,LastErrorCode 傳回 420

備註

憑證在多次文件載入之間保持有效,直到被取代或清除

DLL 另外匯出 ANSI 字串用的 DLSetPublicKeyDecryptionPFXA

另請參閱

SetPublicKeyDecryptionStore, ClearPublicKeyDecryptionCredential, GetPubSecStatus