pub fn open_decrypt(
        &mut self,
        key_path: &Path,
        password: Option<String>,
    ) -> anyhow::Result<()> {
        let file_path = self
            .get_filepath()
            .context("Path of password is not set (this should not happen)")?;

        // Attempt to decrypt password, result will be a one-line string
        let raw_file = decrypt(file_path, key_path, password)?;

        // Store lines in vector
        let vec = string_to_vec(&raw_file).context("Failed to parse password")?;

        // Save vector
        self.password = Some(vec);

        Ok(())
    }
/// Open password in file and decrypt it with `key`
Open password in file and decrypt it with `key`
Open password in file and decrypt it with ` key `
pub fn open_decrypt(
        &mut self,
        key_path: &Path,
        password: Option<String>,
    ) -> anyhow::Result<()> {
        let file_path = self
            .get_filepath()
            .context("Path of password is not set (this should not happen)")?;
        // Attempt to decrypt password, result will be a one-line string
        let raw_file = decrypt(file_path, key_path, password)?;
        // Store lines in vector
        let vec = string_to_vec(&raw_file).context("Failed to parse password")?;
        // Save vector
        self.password = Some(vec);
        Ok(())
    }
pub fn open_decrypt ( & mut self , key_path : & Path , password : Option < String > , ) -> anyhow :: Result < ( ) > { let file_path = self . get_filepath ( ) . context ( " " ) ? ; // Attempt to decrypt password, result will be a one-line string let raw_file = decrypt ( file_path , key_path , password ) ? ; // Store lines in vector let vec = string_to_vec ( & raw_file ) . context ( " " ) ? ; // Save vector self . password = Some ( vec ) ; Ok ( ( ) ) }
Open password in file and decrypt it with `key`
Open password in file and decrypt it with ` key `
&mut self
key_path
&Path
password
Option<String>
&mut self
key_path
&Path
password
Option<String>