Skip to main content

export_to

Function export_to 

Source
pub fn export_to(
    input: &BackupInput,
    passphrase: &[u8],
    exporter: &dyn Signer,
    out: &mut dyn Write,
) -> Result<u64, BackupError>
Expand description

Write a backup artifact into out, drawing a fresh random wrap salt, at the production WRAP_PARAMS cost (production path), and return its length in bytes.

Each asset’s ciphertext is streamed from its CiphertextSource as its entry is written, so memory stays at one STREAM chunk of an original whatever the library’s size. On an error out holds a partial artifact, which the caller must discard.

This is the entry point Workspace::export_backup runs, and it takes no cost argument, so no caller of it can produce a weak artifact.