Function engine::snapshot::write_to[][src]

pub fn write_to(
    plain: &[u8],
    path: &Path,
    key: &Key,
    associated_data: &[u8]
) -> Result<()>

Atomically encrypt and write the specified plaintext to the specified path

This is achieved by creating a temporary file in the same directory as the specified path (same filename with a salted suffix). This is currently known to be problematic if the path is a symlink and/or if the target path resides in a directory without user write permission.