mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Update sm4_cbc_sm3_hmac.c
This commit is contained in:
@@ -32,12 +32,16 @@ static const char *options =
|
|||||||
" -in file | stdin Input data\n"
|
" -in file | stdin Input data\n"
|
||||||
" -out file | stdout Output data\n"
|
" -out file | stdout Output data\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Examples"
|
"Examples\n"
|
||||||
"\n"
|
"\n"
|
||||||
" echo \"hello\" | gmssl sm4_cbc_sm3_hmac -encrypt -key 11223344556677881122334455667788 -iv 112233445566778811223344 -out ciphertext.bin\n"
|
" $ TEXT=`gmssl rand -outlen 20 -hex`\n"
|
||||||
" gmssl sm4_cbc_sm3_hmac -decrypt -key 11223344556677881122334455667788 -iv 112233445566778811223344 -in ciphertext.bin\n"
|
" $ KEY=`gmssl rand -outlen 48 -hex`\n"
|
||||||
|
" $ IV=`gmssl rand -outlen 16 -hex`\n"
|
||||||
|
" $ echo -n $TEXT | gmssl sm4_cbc_sm3_hmac -encrypt -key $KEY -iv $IV -out sm4_cbc_sm3_hmac_ciphertext.bin\n"
|
||||||
|
" $ gmssl sm4_cbc_sm3_hmac -decrypt -key $KEY -iv $IV -in sm4_cbc_sm3_hmac_ciphertext.bin\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
int sm4_cbc_sm3_hmac_main(int argc, char **argv)
|
int sm4_cbc_sm3_hmac_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user