fix: correct argument names

This commit is contained in:
EETagent 2022-11-11 20:48:14 +01:00
parent cb4b3ff08a
commit 9c9cc5a73a

View file

@ -50,8 +50,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
), ),
) )
.subcommand( .subcommand(
Command::new("encryption") Command::new("symmetric")
.about("Encryption operations") .about("Symmetric encryption operations")
.arg( .arg(
arg!( arg!(
-d --decrypt ... "Decrypt flag" -d --decrypt ... "Decrypt flag"
@ -73,8 +73,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
) )
) )
.subcommand( .subcommand(
Command::new("asymetric") Command::new("asymmetric")
.about("Asymetric encryption operations") .about("Asymmetric encryption operations")
.arg( .arg(
arg!( arg!(
-d --decrypt ... "Decrypt flag" -d --decrypt ... "Decrypt flag"
@ -129,7 +129,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{}", hash); println!("{}", hash);
} }
Some(("encryption", sub_matches)) => { Some(("symmetric", sub_matches)) => {
let decrypt = sub_matches.get_one::<bool>("decrypt").unwrap(); let decrypt = sub_matches.get_one::<bool>("decrypt").unwrap();
let input = sub_matches.get_one::<String>("input").unwrap(); let input = sub_matches.get_one::<String>("input").unwrap();
let key = sub_matches.get_one::<String>("key").unwrap(); let key = sub_matches.get_one::<String>("key").unwrap();
@ -142,7 +142,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{}", result); println!("{}", result);
} }
Some(("asymetric", sub_matches)) => { Some(("asymmetric", sub_matches)) => {
let decrypt = sub_matches.get_one::<bool>("decrypt").unwrap(); let decrypt = sub_matches.get_one::<bool>("decrypt").unwrap();
let input = sub_matches.get_one::<String>("input").unwrap(); let input = sub_matches.get_one::<String>("input").unwrap();
let key = sub_matches.get_one::<String>("key").unwrap(); let key = sub_matches.get_one::<String>("key").unwrap();