mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-13 03:46:26 +08:00
15 lines
427 B
Bash
Executable File
15 lines
427 B
Bash
Executable File
#!/bin/bash -x
|
|
|
|
#key=00000000000000000000000000000000
|
|
#iv=00000000000000000000000000000000
|
|
|
|
key=12345678123456781234567812345678
|
|
iv=12345678123456781234567812345678
|
|
plaintext="This is the plaintext message."
|
|
|
|
ciphertext=`echo $plaintext | sudo gmssl sms4 -K $key -iv $iv -a`
|
|
|
|
echo $ciphertext
|
|
echo $plaintext | sudo gmssl sms4 -engine sdf -K $key -iv $iv -a
|
|
echo $ciphertext | sudo gmssl sms4 -d -engine sdf -K $key -iv $iv -a
|