Skip to content

StandardSecurityDecryptor.TryComputeFileKey has no production caller #209

Closed

Description

@Tim81

Found during the #97 review; out of scope there.

StandardSecurityDecryptor.TryComputeFileKey (src/VellumPdf.Kernel/Encryption/StandardSecurityDecryptor.cs:310)
is reached from exactly one place in the tree: StandardSecurityDecryptorTests.cs:113. Nothing in
src/ calls it. The live authentication policy is EncryptionSetup.TryAuthenticate, which walks the
candidate password encodings itself and tries owner before user, so that it can report which of the two
matched.

The two orders differ, and the doc comment now explains why that is immaterial for a method answering
only "does this password open the document at all?". That comment is the reason this is a cleanup rather
than a trap — but it documents a method held alive by its own test, which is the shape that goes stale
without anyone noticing.

Two ways out, either fine:

Worth doing before VellumPdf.Reader graduates from Preview (#187), so the decision is made
deliberately rather than by the surface simply persisting.

Activity

  1. added
    type/chore
    area/reader
    on Aug 27, 2026
  2. added 4 commits that reference this issue on Sep 6, 2026
    8ea1742
    59b61c4
    0fc0c12
    fb075b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/readertype/chore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions