feat: updates

This commit is contained in:
2025-03-29 00:04:25 +08:00
parent 6d3298549e
commit a6bff6d31c
36 changed files with 115 additions and 137 deletions

View File

@@ -2,7 +2,7 @@ use clap::{App, Arg, ArgMatches, SubCommand};
use rust_util::util_clap::{Command, CommandError};
use std::collections::BTreeMap;
use crate::{cmdutil, hmacutil};
use crate::{cmdutil, hmacutil, util};
pub struct CommandImpl;
@@ -32,10 +32,8 @@ impl Command for CommandImpl {
if json_output {
let mut json = BTreeMap::<&'_ str, String>::new();
json.insert("plaintext", plaintext);
println!(
"{}",
serde_json::to_string_pretty(&json).expect("Convert to JSON failed!")
);
util::print_pretty_json(&json);
} else {
success!("Plaintext: {}", plaintext);
}