SetPublicKeyDecryptionPFX

Security and signatures

Description

Sets the PKCS #12 PFX credential used by subsequent LoadFromFile, LoadFromStream, and LoadFromString calls

Syntax

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);

Parameters

PFXFileNamePath to a PFX containing a recipient private key
PFXPasswordPassword protecting the PFX
UseMachineKeysetUse a nonzero value for the machine keyset or zero for the user keyset

Return values

1The credential was validated and retained
0The PFX or password was invalid and LastErrorCode returns 420

Remarks

The credential remains active across document loads until replaced or cleared

The DLL also exports DLSetPublicKeyDecryptionPFXA for ANSI strings

See also

SetPublicKeyDecryptionStore, ClearPublicKeyDecryptionCredential, GetPubSecStatus