mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-08 23:13:38 +08:00
Update tools help
This commit is contained in:
@@ -29,22 +29,21 @@ static const char *options =
|
||||
" -decrypt Decrypt\n"
|
||||
" -key hex Symmetric key in HEX format\n"
|
||||
" -iv hex IV in HEX format\n"
|
||||
" -in file | stdin Input data\n"
|
||||
" -in file | stdin Input data, any byte length is accepted\n"
|
||||
" -out file | stdout Output data\n"
|
||||
"\n"
|
||||
"Examples\n"
|
||||
"\n"
|
||||
" $ TEXT=`gmssl rand -outlen 20 -hex`\n"
|
||||
" $ KEY=`gmssl rand -outlen 16 -hex`\n"
|
||||
" $ IV=`gmssl rand -outlen 16 -hex`\n"
|
||||
" $ echo -n $TEXT | gmssl sm4_cfb -encrypt -key $KEY -iv $IV -out sm4_cfb128_ciphertext.bin\n"
|
||||
" $ gmssl sm4_cfb -decrypt -key $KEY -iv $IV -in sm4_cfb128_ciphertext.bin\n"
|
||||
" KEY=`gmssl rand -outlen 16 -hex`\n"
|
||||
" IV=`gmssl rand -outlen 16 -hex`\n"
|
||||
" echo -n abc | gmssl sm4_cfb -encrypt -key $KEY -iv $IV -out sm4_cfb128_ciphertext.bin\n"
|
||||
" gmssl sm4_cfb -decrypt -key $KEY -iv $IV -in sm4_cfb128_ciphertext.bin\n"
|
||||
"\n"
|
||||
" $ echo -n $TEXT | gmssl sm4_cfb -sbytes 1 -encrypt -key $KEY -iv $IV -out sm4_cfb8_ciphertext.bin\n"
|
||||
" $ gmssl sm4_cfb -sbytes 1 -decrypt -key $KEY -iv $IV -in sm4_cfb8_ciphertext.bin\n"
|
||||
" echo -n abc | gmssl sm4_cfb -sbytes 1 -encrypt -key $KEY -iv $IV -out sm4_cfb8_ciphertext.bin\n"
|
||||
" gmssl sm4_cfb -sbytes 1 -decrypt -key $KEY -iv $IV -in sm4_cfb8_ciphertext.bin\n"
|
||||
"\n"
|
||||
" $ echo -n $TEXT | gmssl sm4_cfb -sbytes 8 -encrypt -key $KEY -iv $IV -out sm4_cfb64_ciphertext.bin\n"
|
||||
" $ gmssl sm4_cfb -sbytes 8 -decrypt -key $KEY -iv $IV -in sm4_cfb64_ciphertext.bin\n"
|
||||
" echo -n 01234567 | gmssl sm4_cfb -sbytes 8 -encrypt -key $KEY -iv $IV -out sm4_cfb64_ciphertext.bin\n"
|
||||
" gmssl sm4_cfb -sbytes 8 -decrypt -key $KEY -iv $IV -in sm4_cfb64_ciphertext.bin\n"
|
||||
"\n";
|
||||
|
||||
int sm4_cfb_main(int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user