feat: v1.9.17

This commit is contained in:
2025-10-17 19:20:41 +08:00
parent 0e6b590f32
commit a6397fc45a
9 changed files with 52 additions and 17 deletions

View File

@@ -77,12 +77,16 @@ pub struct CmdEncrypt {
#[arg(long, short = 'A')]
pub encryption_algorithm: Option<String>,
/// Config file or based64 encoded (starts with: base64:)
#[arg(long)]
pub config: Option<String>,
/// Files need to be decrypted
pub paths: Vec<PathBuf>,
}
pub fn encrypt(cmd_encrypt: CmdEncrypt) -> XResult<()> {
let config = TinyEncryptConfig::load_default()?;
let config = TinyEncryptConfig::load_default(&cmd_encrypt.config)?;
debugging!("Found tiny encrypt config: {:?}", config);
let mut envelops = config.find_envelops(&cmd_encrypt.profile, &cmd_encrypt.key_filter)?;
debugging!("Found envelops: {:?}", envelops);