Creates a new public key security handler.
Configuration including recipients and encryption settings.
The encryption dictionary containing all encryption parameters.
Whether to encrypt document metadata.
Numeric permission flags.
ProtectedbuildBuilds the numeric permission flags from a PdfPermissions object.
The permissions to encode.
The numeric permission flags.
Checks if metadata encryption is enabled.
True if metadata should be encrypted.
Computes the object encryption key.
OptionalobjectNumber: numberThe PDF object number.
OptionalgenerationNumber: numberThe PDF generation number.
The computed object key.
Decodes the numeric permission flags into a PdfPermissions object.
An object with boolean flags for each permission.
Decrypts data using the underlying security handler.
The type of content being decrypted.
The encrypted data.
OptionalobjectNumber: numberThe PDF object number.
OptionalgenerationNumber: numberThe PDF generation number.
The decrypted data.
Recursively decrypts all strings and streams within an indirect object.
The indirect object to decrypt.
Encrypts data using the underlying security handler.
The type of content being encrypted.
The data to encrypt.
OptionalobjectNumber: numberThe PDF object number.
OptionalgenerationNumber: numberThe PDF generation number.
The encrypted data.
Recursively encrypts all strings and streams within an indirect object.
The indirect object to encrypt.
Gets the security handler filter name.
'Adobe.PubSec' for public key encryption.
Gets the encryption revision number.
The revision from the underlying handler.
Gets the underlying standard security handler.
The standard security handler used for encryption.
Gets the encryption version number.
The version from the underlying handler.
Checks if the handler is ready.
True if the underlying handler is ready.
Reads encryption parameters from the encryption dictionary.
The encryption dictionary from the PDF.
Writes the encryption dictionary with public key-specific entries.
Public key security handler implementing certificate-based encryption. Uses PKCS#7 enveloped data to encrypt the file key for each recipient.
Example