Skip to main content

stream_decrypt_file

Function stream_decrypt_file 

Source
pub fn stream_decrypt_file(
    file: &DecryptionInputFile,
    parsed: &ParsedFile,
    key: &SecureKey,
    metadata: &FileMetadata,
    output_dir: &Path,
    force: bool,
) -> Result<DecryptionOutputFile, WorkflowError>
Expand description

Streams the encrypted input file’s content into plaintext output: a single file, or an extracted directory tree when the metadata marks the content as an archive. Preserved metadata is restored afterwards. Memory is bounded by the format’s chunk size (formats without chunking are decrypted as one piece).