feat: fix compile issue, code style

This commit is contained in:
2023-12-23 15:53:26 +08:00
parent a3d101a405
commit 171cd2d2a4
5 changed files with 32 additions and 2 deletions

View File

@@ -28,33 +28,43 @@ use crate::wrap_key::{WrapKey, WrapKeyHeader};
pub struct CmdEncrypt {
/// Files need to be decrypted
pub paths: Vec<PathBuf>,
/// Plaintext comment
#[arg(long, short = 'c')]
pub comment: Option<String>,
/// Encrypted comment
#[arg(long, short = 'C')]
pub encrypted_comment: Option<String>,
/// Encryption profile (use default when --key-filter is assigned)
#[arg(long, short = 'p')]
pub profile: Option<String>,
/// Encryption key filter (key_id or type:TYPE(e.g. ecdh, pgp, ecdh-p384, pgp-ed25519), multiple joined by ',', ALL for all)
#[arg(long, short = 'k')]
pub key_filter: Option<String>,
/// Compress before encrypt
#[arg(long, short = 'x')]
pub compress: bool,
/// Compress level (from 0[none], 1[fast] .. 6[default] .. to 9[best])
#[arg(long, short = 'L')]
pub compress_level: Option<u32>,
/// Remove source file
#[arg(long, short = 'R')]
pub remove_file: bool,
/// Create file (create a empty encrypted file)
#[arg(long, short = 'a')]
pub create: bool,
/// Disable compress meta
#[arg(long)]
pub disable_compress_meta: bool,
/// Encryption algorithm (AES/GCM, CHACHA20/POLY1305 or AES, CHACHA20, default AES/GCM)
#[arg(long, short = 'A')]
pub encryption_algorithm: Option<String>,