Skip to content

Commit

Permalink
Update sm4_ctr_sm3_hmac.c
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed May 14, 2024
1 parent ba16694 commit f5ed971
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/sm4_ctr_sm3_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ static const char *options =
" -in file | stdin Input data\n"
" -out file | stdout Output data\n"
"\n"
"Examples"
"Examples\n"
"\n"
" echo \"hello\" | gmssl sm4_ctr_sm3_hmac -encrypt -key 11223344556677881122334455667788 -iv 112233445566778811223344 -out ciphertext.bin\n"
" gmssl sm4_ctr_sm3_hmac -decrypt -key 11223344556677881122334455667788 -iv 112233445566778811223344 -in ciphertext.bin\n"
" $ TEXT=`gmssl rand -outlen 20 -hex`\n"
" $ KEY=`gmssl rand -outlen 48 -hex`\n"
" $ IV=`gmssl rand -outlen 16 -hex`\n"
" $ echo -n $TEXT | gmssl sm4_ctr_sm3_hmac -encrypt -key $KEY -iv $IV -out sm4_ctr_sm3_hmac_ciphertext.bin\n"
" $ gmssl sm4_ctr_sm3_hmac -decrypt -key $KEY -iv $IV -in sm4_ctr_sm3_hmac_ciphertext.bin\n"
"\n";


int sm4_ctr_sm3_hmac_main(int argc, char **argv)
{
int ret = 1;
Expand Down

0 comments on commit f5ed971

Please sign in to comment.