mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-29 19:56:16 +08:00
Update some demos
This commit is contained in:
14
demos/sdf/sdf-sm4.sh
Executable file
14
demos/sdf/sdf-sm4.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user