Class PdfEncryptionOptions
How to protect a copy. Passwords are prepared (SASLprep for AES-256) and never stored beyond the write.
public sealed class PdfEncryptionOptions
- Inheritance
-
PdfEncryptionOptions
- Inherited Members
Properties
AllowInvalidatingSignatures
A rewrite breaks every digital signature; it is refused unless the caller has confirmed that.
public bool AllowInvalidatingSignatures { get; init; }
Property Value
CurrentOwnerPassword
For a document that is already encrypted: its permissions password, unless it was opened with it.
public string? CurrentOwnerPassword { get; init; }
Property Value
EncryptMetadata
False leaves the XMP metadata stream readable (for search engines and indexers).
public bool EncryptMetadata { get; init; }
Property Value
OwnerPassword
The permissions password, which lifts the restrictions and allows changing the security. When empty the open password doubles as it, which is only allowed with no restrictions.
public string? OwnerPassword { get; init; }
Property Value
Permissions
public PdfPermissionSet Permissions { get; init; }
Property Value
Strength
public PdfEncryptionStrength Strength { get; init; }
Property Value
UserPassword
The open password; null or empty opens the document without one (permissions still apply).
public string? UserPassword { get; init; }