Skip to content

Commit

Permalink
acipher main.rs: Fix arg validation error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Gilligan <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
Reviewed-by: Yuan Zhuang <[email protected]>
  • Loading branch information
msgilligan authored and DemesneGH committed May 22, 2024
1 parent 71f3b82 commit 1a25772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/acipher-rs/host/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ fn main() -> optee_teec::Result<()> {
if args.len() != 3 {
println!(
"Receive {} arguments while 2 arguments are expected!",
args.len()
args.len() - 1
);
println!("Correct usage: passed 2 arguments as <key_size> and <string to encrypt>");
println!("Correct usage: {} <key_size> <string to encrypt>", args[0]);
return Err(Error::new(ErrorKind::BadParameters));
}

let mut key_size = args[1].parse::<u32>().unwrap();
if key_size < 256 {
println!(
"Wrong key size {} is received. Use default minimal key size 256 instead.",
"Key size of {} is too small. Using default minimal key size 256 instead.",
key_size
);
key_size = 256;
Expand Down

0 comments on commit 1a25772

Please sign in to comment.