mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Update Tools
This commit is contained in:
5
demos/pbkdf2demo.sh
Executable file
5
demos/pbkdf2demo.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
gmssl pbkdf2 -pass 1234 -salt 1122334455667788 -iter 60000 -outlen 16
|
||||
|
||||
10
demos/sm2demo.sh
Executable file
10
demos/sm2demo.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
gmssl sm2keygen -pass 1234 -out sm2.pem -pubout sm2pub.pem
|
||||
|
||||
echo hello | gmssl sm2sign -key sm2.pem -pass 1234 -out sm2.sig #-id 1234567812345678
|
||||
echo hello | gmssl sm2verify -pubkey sm2pub.pem -sig sm2.sig -id 1234567812345678
|
||||
|
||||
echo hello | gmssl sm2encrypt -pubkey sm2pub.pem -out sm2.der
|
||||
gmssl sm2decrypt -key sm2.pem -pass 1234 -in sm2.der
|
||||
|
||||
10
demos/sm3demo.sh
Executable file
10
demos/sm3demo.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -n abc | gmssl sm3
|
||||
|
||||
gmssl sm2keygen -pass 1234 -out sm2.pem -pubout sm2pub.pem
|
||||
echo -n abc | gmssl sm3 -pubkey sm2pub.pem -id 1234567812345678
|
||||
|
||||
|
||||
echo -n abc | gmssl sm3hmac -key 11223344556677881122334455667788
|
||||
|
||||
12
demos/sm4demo.sh
Executable file
12
demos/sm4demo.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
KEY=11223344556677881122334455667788
|
||||
IV=11223344556677881122334455667788
|
||||
|
||||
echo hello | gmssl sm4 -cbc -encrypt -key $KEY -iv $IV -out sm4.cbc
|
||||
gmssl sm4 -cbc -decrypt -key $KEY -iv $IV -in sm4.cbc
|
||||
|
||||
echo hello | gmssl sm4 -ctr -encrypt -key $KEY -iv $IV -out sm4.ctr
|
||||
gmssl sm4 -ctr -decrypt -key $KEY -iv $IV -in sm4.ctr
|
||||
|
||||
10
demos/zucdemo.sh
Executable file
10
demos/zucdemo.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
KEY=11223344556677881122334455667788
|
||||
IV=11223344556677881122334455667788
|
||||
|
||||
echo hello | gmssl zuc -key $KEY -iv $IV -out zuc.bin
|
||||
gmssl zuc -key $KEY -iv $IV -in zuc.bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user