pub enum Skip {
EncryptDict,
XrefStream,
ExternalStream,
ClearMetadata,
IdentityCryptFilter,
}Expand description
Why an object’s bytes are left alone.
Returned rather than a bare bool so the reason can be asserted in tests
and reported in diagnostics — “this stream was skipped” is not a useful
fact without “because it is a cross-reference stream”.
Variants§
EncryptDict
E3/E2 — this is the /Encrypt dictionary. §7.6.1: the encryption
dictionary “shall not” be encrypted, and neither are its strings; it has
to be readable before any key exists.
XrefStream
E5 — a cross-reference stream. §7.5.8.2 exempts it because the
bootstrap order (xref → trailer → /Encrypt → authenticate → decrypt)
means nothing on the path to the key may itself require the key
(T6).
ExternalStream
E6 — the data is in another file (/F), so there are no bytes here.
Note the asymmetry: an embedded file stream is encrypted.
ClearMetadata
E8 — the document metadata stream, left in the clear by
/EncryptMetadata false. This changes the key as well (Algorithm 2
step (f), T11), so the two must agree or nothing decrypts.
IdentityCryptFilter
E8, second spelling — a /Crypt filter naming /Identity. Unlike
/EncryptMetadata, this does not change the file key (T23); both
mechanisms exist and a document may use either.