Skip to main content

open_encrypted

Function open_encrypted 

Source
pub fn open_encrypted(
    primary: &Path,
    paths: &Paths,
    output: Output,
    only: Option<&[PathBuf]>,
    writable: bool,
    password: Option<String>,
    reads: &Arc<Reads>,
    ask: impl FnMut(bool) -> Option<String>,
) -> Result<(State, Option<String>)>
Expand description

Opens an archive that may be encrypted. ask is called whenever a password is needed or the last one was wrong, and returns None to give up. Archives with a password are proven with Job::check_password before this returns, so nothing is deleted on a wrong guess. Returns the state and the password that worked.