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
| Source | Where the certificate comes from: pkrFile, pkrPFX or pkrStore |
|---|---|
| Location | Certificate file path for pkrFile, PFX file path for pkrPFX, store name for pkrStore |
| Credential | Empty for pkrFile, PFX password for pkrPFX, certificate display name for pkrStore |
| UseMachine | Nonzero to use the machine keyset for pkrPFX or the local-machine store for pkrStore, zero for the user scope |
| Permissions | Permission mask returned by EncodePermissions |
Return values
| 1 | The recipient was added, or an identical entry was already present |
|---|---|
| 0 | The certificate, the credentials, the permissions or the document state was invalid |
See also
TPDFlibPublicKeyRecipientSource, TPDFlibPublicKeyEncrypt, AddPublicKeyRecipientFromPFX