The Security plugin processes a PDF through a single Process method, driven entirely by the options object you pass it: EncryptionOptions encrypts, DecryptionOptions decrypts. EncryptionOptions takes a user password, an owner password, a DocumentPrivilege permission set, and a CryptoAlgorithm, and a probe against the real package confirms the result: a document encrypted this way fails to open with the wrong password, and opens with the correct password with every original page intact. DecryptionOptions needs only the owner password; running it against an encrypted file removes the password requirement entirely while preserving the page count.
It encrypts a PDF with a password and a permission set through EncryptionOptions, and decrypts an already-protected PDF through DecryptionOptions, both via the same Security plugin’s Process method.
RC4x40, RC4x128, AESx128, and AESx256 are all directly supported and were each confirmed to produce a valid encrypted file; a Custom option is also available for a caller-supplied algorithm handler.
No – a direct test confirmed that opening a PDF encrypted by this plugin with an incorrect password fails.
Only the owner password: DecryptionOptions is constructed with a single owner-password argument.
DocumentPrivilege’s individual switches, such as AllowPrint and AllowCopy, are set together with EncryptionOptions’ password arguments, so the permission set and the open password are configured in the same step.