AbstractCreates a new security handler.
Optionaloptions: PdfSecurityHandlerOptionsConfiguration options for the security handler.
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.
AbstractcomputeComputes the object-specific encryption key.
OptionalobjectNumber: numberThe PDF object number.
OptionalgenerationNumber: numberThe PDF generation number.
Optionalalgorithm: PdfEncryptionAlgorithmTypeOptional algorithm type for key derivation.
The computed object key.
Decodes the numeric permission flags into a PdfPermissions object.
An object with boolean flags for each permission.
AbstractdecryptDecrypts data of a specific type.
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.
AbstractencryptEncrypts data of a specific type.
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.
AbstractgetAbstractgetGets the security handler filter name.
The filter name (e.g., 'Standard').
AbstractgetGets the encryption revision number.
The revision number.
AbstractgetGets the encryption version number.
The version number (1-5).
AbstractisChecks if the security handler is ready for encryption/decryption.
True if ready, false otherwise.
AbstractreadReads and applies encryption parameters from a dictionary.
The encryption dictionary from the PDF trailer.
AbstractsetAbstractwriteWrites the encryption dictionary with computed keys.
Abstract base class for PDF security handlers. Security handlers manage encryption, decryption, and access permissions for PDF documents.
Example