Skip to main content

encrypt_file

Function encrypt_file 

Source
pub fn encrypt_file(
    path: &Path,
    derived_key: &[u8; 32],
    salt: &[u8; 16],
    file_id: Option<[u8; 16]>,
    zstd: Option<u8>,
) -> Result<Option<FileHeader>>
Expand description

Encrypt a single file using streaming chunked encryption.

Returns Some(header) on success, or None if the file was already encrypted and skipped.