How a save encrypts the document with the standard security handler: passwords, permissions, algorithm and metadata.
public sealed class PdfEncryptionOptions
ISO 32000-2 §7.6.4 (standard security handler). Opening the saved file with the user password grants Permissions; opening it with the owner password grants every permission (§7.6.4.1). Without an owner password the user password serves as both (Algorithm 3 step a), so no password grants more than Permissions. An empty user password opens the document without asking for one, with those permissions.
The default algorithm, Aes256 (revision 6), like Aes256Gcm (revision 7), takes passwords of any Unicode text, prepared with SASLprep (RFC 4013) and encoded as UTF-8, of which the first 127 bytes count (§7.6.4.3.3). The deprecated algorithms take passwords PDFDocEncoding can represent, of which the first 32 bytes count (§7.6.4.3.2).
Every string and stream is encrypted except those §7.6.2 exempts: the encryption dictionary, the trailer's file identifiers,
cross-reference streams, the Contents of signature dictionaries, and, when EncryptMetadata is
false, metadata streams.
kind:method, kind:property, kind:ctor. Press Esc to clear.PdfEncryptionOptions(String?, String?)Initializes a new instance of the PdfEncryptionOptions class.AlgorithmGets or sets the algorithm. The default is Aes256; Aes256Gcm is its ISO/TS 32003 extension, and the others are deprecated in PDF 2.0.EncryptMetadataGets or sets a value indicating whether metadata streams are encrypted. The default is true; with false, a metadata stream stays readable to tools that index files without the password.IntegrityProtectionGets or sets a value indicating whether the saved file carries an integrity MAC (a PDF MAC token) that a reader holding the file encryption key checks against every byte of the file. The default is false.OwnerPasswordGets the owner password, which is the user password when none was given.PermissionsGets or sets what opening the document with the user password permits. The default is All.UserPasswordGets the user password; empty when the document opens without a password.