Skip to main content

shadow_crypt_shell/decryption/
file.rs

1use std::path::PathBuf;
2
3use crate::memory::SecureString;
4
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct DecryptionInputFile {
7    pub path: PathBuf,
8    pub filename: String,
9    pub size: u64,
10}
11
12pub struct DecryptionInput {
13    pub files: Vec<DecryptionInputFile>,
14    pub password: SecureString,
15    pub output_dir: PathBuf,
16    /// Overwrite existing output files instead of failing.
17    pub force: bool,
18    /// Suppress progress and per-file success output (errors still shown).
19    pub quiet: bool,
20}
21impl DecryptionInput {
22    pub fn new(
23        files: Vec<DecryptionInputFile>,
24        password: SecureString,
25        output_dir: PathBuf,
26        force: bool,
27        quiet: bool,
28    ) -> Self {
29        Self {
30            files,
31            password,
32            output_dir,
33            force,
34            quiet,
35        }
36    }
37}
38
39pub struct DecryptionOutputFile {
40    pub path: PathBuf,
41    pub filename: String,
42}