feat: updates
This commit is contained in:
@@ -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("ciphertext", hmac_encrypt_ciphertext);
|
||||
println!(
|
||||
"{}",
|
||||
serde_json::to_string_pretty(&json).expect("Convert to JSON failed!")
|
||||
);
|
||||
|
||||
util::print_pretty_json(&json);
|
||||
} else {
|
||||
success!("HMAC encrypt ciphertext: {}", hmac_encrypt_ciphertext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user