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

@@ -38,6 +38,7 @@ use crate::util_digest::DigestWrite;
use crate::util_keychainkey;
#[cfg(feature = "macos")]
use crate::util_keychainstatic;
#[cfg(feature = "macos")]
use crate::util_keychainstatic::KeychainKey;
use crate::util_progress::Progress;
use crate::wrap_key::WrapKey;
@@ -46,36 +47,47 @@ use crate::wrap_key::WrapKey;
pub struct CmdDecrypt {
/// Files need to be decrypted
pub paths: Vec<PathBuf>,
/// PGP or PIV PIN
#[arg(long, short = 'p')]
pub pin: Option<String>,
/// KeyID
#[arg(long, short = 'k')]
pub key_id: Option<String>,
/// PIV slot
#[arg(long, short = 's')]
pub slot: Option<String>,
/// Remove source file
#[arg(long, short = 'R')]
pub remove_file: bool,
/// Skip decrypt file
#[arg(long, short = 'S')]
pub skip_decrypt_file: bool,
/// Direct print to the console, file must less than 10K
#[arg(long, short = 'P')]
pub direct_print: bool,
/// Split std out and std err
#[arg(long)]
pub split_print: bool,
/// Digest file
#[arg(long, short = 'D')]
pub digest_file: bool,
/// Edit file
#[arg(long, short = 'E')]
pub edit_file: bool,
/// Readonly mode
#[arg(long)]
pub readonly: bool,
/// Digest algorithm (sha1, sha256[default], sha384, sha512 ...)
#[arg(long, short = 'A')]
pub digest_algorithm: Option<String>,