TPDFlibPublicKeyRecipientRegister

Data types, security and signatures

Description

Registers one public-key recipient for the AddPublicKeyRecipient methods.

TPDFlib declares the public methods and a protected dispatch method for registering recipients for public-key encryption. The edition class supplies the implementation as a callback of this type. A plain TPDFlib instance supplies none, so the call returns the documented empty result and sets LastErrorCode to PDFLIB_ERROR_ENTERPRISE_REQUIRED. Application code never declares, assigns or calls a value of this type.

Syntax

Delphi

TPDFlibPublicKeyRecipientRegister = Function(Source: TPDFlibPublicKeyRecipientSource;
  Const Location, Credential: WideString; UseMachine, Permissions: Integer): Integer Of Object;

Parameters

SourceWhere the certificate comes from: pkrFile, pkrPFX or pkrStore
LocationCertificate file path for pkrFile, PFX file path for pkrPFX, store name for pkrStore
CredentialEmpty for pkrFile, PFX password for pkrPFX, certificate display name for pkrStore
UseMachineNonzero to use the machine keyset for pkrPFX or the local-machine store for pkrStore, zero for the user scope
PermissionsPermission mask returned by EncodePermissions

Return values

1The recipient was added, or an identical entry was already present
0The certificate, the credentials, the permissions or the document state was invalid

See also

TPDFlibPublicKeyRecipientSource, TPDFlibPublicKeyEncrypt, AddPublicKeyRecipientFromPFX