Skip to content

Question : how to random access or skip during decryption #2121

@mkeskells

Description

@mkeskells

Problem:

I have a need to handle large files and service a random address range for decryption.
Looking throgh the exampes I dont see an effecient way to do this.
It seems that the underlying encryption data is framed, but the CryptoInputStream doesn't skip in an input stream, and there isnt a support for a Readable Channel that I am aware of

Solution:

With the existing API - I could use skip in the InputStream, but this will (as I see it) decrypt and throw away the skipped bytes, with extra I/O and CPU load
With an enhanced implementation we could skip on the input stream to the start of a frame and then decrypt that frame (skipping internally to the offset needed by decodng and thowin a few bytes if needed)

Out of scope:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions