IsEncrypted Property

Definition

Namespace Broadside
Assembly Broadside.dll

Gets a value indicating whether the document is encrypted (its trailer's Encrypt entry is an encryption dictionary).

public bool IsEncrypted { get; }

Returns

Remarks

ISO 32000-2 §7.6.1, §7.6.2. An encrypted document opens transparently: strings and streams read through it are decrypted, so its COS objects hold plaintext. An Encrypt entry that is not a dictionary (a damaged file) is reported as an EncryptDictionaryInvalid error (strict mode throws) and the document is read as not encrypted; it then also saves as one, so a save never refuses it for its encryption: a complete file drops the entry, and so does an incremental update that removes encryption (RemoveEncryption).