encrypted_chunk_range

Function encrypted_chunk_range 

Source
pub fn encrypted_chunk_range(
    plaintext_start: u64,
    plaintext_end: u64,
) -> (u64, u64)
Expand description

Calculate the encrypted byte range for a plaintext byte range.

Returns (chunk_start, chunk_end) - the byte positions in the encrypted file where the needed chunks are located. Does NOT include the nonce (first 24 bytes).

Use this for efficient range requests: fetch nonce separately (or from DB), then fetch just chunk_start..chunk_end from storage.