mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
gmssl: add page (#6408)
This commit is contained in:
parent
2ff6d3a89f
commit
d9921db320
1 changed files with 36 additions and 0 deletions
36
pages/common/gmssl.md
Normal file
36
pages/common/gmssl.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# gmssl
|
||||
|
||||
> GmSSL is a crypto toolkit supporting SM1, SM2, SM3, SM4, SM9, and ZUC/ZUC256.
|
||||
> More information: <http://gmssl.org/english.html>.
|
||||
|
||||
- Generate an SM3 hash for a file:
|
||||
|
||||
`gmssl sm3 {{path/to/file}}`
|
||||
|
||||
- Encrypt a file using the SM4 cipher:
|
||||
|
||||
`gmssl sms4 -e -in {{path/to/file}} -out {{path/to/file.sms4}}`
|
||||
|
||||
- Decrypt a file using the SM4 cipher:
|
||||
|
||||
`gmssl sms4 -d -in {{path/to/file.sms4}}`
|
||||
|
||||
- Generate an SM2 private key:
|
||||
|
||||
`gmssl sm2 -genkey -out {{path/to/file.pem}}`
|
||||
|
||||
- Generate an SM2 public key from an existing private key:
|
||||
|
||||
`gmssl sm2 -pubout -in {{path/to/file.pem}} -out {{path/to/file.pem.pub}}`
|
||||
|
||||
- Encrypt a file using the ZUC cipher:
|
||||
|
||||
`gmssl zuc -e -in {{path/to/file}} -out {{path/to/file.zuc}}`
|
||||
|
||||
- Decrypt a file using the ZUC cipher:
|
||||
|
||||
`gmssl zuc -d -in {{path/to/file.zuc}}`
|
||||
|
||||
- Print version:
|
||||
|
||||
`gmssl version`
|
Loading…
Add table
Reference in a new issue