gpg: add Chinese translation (#5193)

This commit is contained in:
Tiny 2021-01-30 03:16:53 +00:00 committed by GitHub
parent 9c98fb2eb1
commit a52007380f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# gpg-zip
> 使用`GPG`加密存档中的文件和目录。
> 更多信息:<https://www.gnupg.org/documentation/manuals/gnupg/gpg_002dzip.html>
- 使用密码将一个目录加密为`archive.gpg`
`gpg-zip --symmetric --output {{archive.gpg}} {{path/to/directory}}`
- 将`archive.gpg`解密到同名目录中:
`gpg-zip --decrypt {{path/to/archive.gpg}}`
- 列出加密的`archive.gpg`的内容:
`gpg-zip --list-archive {{path/to/archive.gpg}}`

38
pages.zh/common/gpg.md Normal file
View File

@ -0,0 +1,38 @@
# gpg
> GNU Privacy Guard。
> 请参阅`gpg2`了解 GNU Privacy Guard 2。
> 更多信息:<https://docs.releng.linuxfoundation.org/en/latest/gpg.html>
- 不加密,仅对`doc.txt`进行签名(生成`doc.txt.asc`,格式为 ASCII 码形式):
`gpg --clearsign {{doc.txt}}`
- 对`doc.txt`进行签名并加密(生成`doc.txt.asc`,格式为 ASCII 码形式):
`gpg --local-user {{sender_id}} --recipient {{recipient_id}} --armor --sign --encrypt {{doc.txt}}`
- 为接收者 alice@example.com 加密`doc.txt`(生成`doc.txt.gpg`
`gpg --encrypt --recipient {{alice@example.com}} {{doc.txt}}`
- 只用密码加密`doc.txt`(生成`doc.txt.gpg`
`gpg --symmetric {{doc.txt}}`
- 解密`doc.txt.gpg`(输出到标准输出):
`gpg --decrypt {{doc.txt.gpg}}`
- 导入一个公钥:
`gpg --import {{public.gpg}}`
- 导出 alice@example.com 的公钥(输出到标准输出):
`gpg --export --armor {{alice@example.com}}`
- 导出 alice@example.com 的私钥(输出到标准输出):
`gpg --export-secret-keys --armor {{alice@example.com}}`

34
pages.zh/common/gpg2.md Normal file
View File

@ -0,0 +1,34 @@
# gpg2
> GNU Privacy Guard 2。
> GNU Privacy Guard 1 请参见`gpg`。
> 更多信息:<https://docs.releng.linuxfoundation.org/en/latest/gpg.html>
- 列出导入的密钥(公钥):
`gpg2 --list-keys`
- 为指定的接收者加密指定的文件,将输出结果写到一个新的文件中,并附加`.gpg`
`gpg2 --encrypt --recipient {{alice@example.com}} {{path/to/doc.txt}}`
- 只用密码(对称加密)对指定文件进行加密,将输出结果写入一个附加`.gpg`的新文件:
`gpg2 --symmetric {{path/to/doc.txt}}`
- 解密指定的文件,并将结果写入标准输出:
`gpg2 --decrypt {{path/to/doc.txt.gpg}}`
- 导入一个公钥:
`gpg2 --import {{path/to/public_key.gpg}}`
- 将指定电子邮件地址的公钥导出到标准输出:
`gpg2 --export --armor {{alice@example.com}}`
- 将指定电子邮件地址的私钥导出到标准输出:
`gpg2 --export-secret-keys --armor {{alice@example.com}}`

17
pages.zh/common/gpgv.md Normal file
View File

@ -0,0 +1,17 @@
# gpgv
> 验证 OpenPGP 签名。
> 更多信息:<https://www.gnupg.org/documentation/manuals/gnupg/gpgv.html>
- 验证签名文件:
`gpgv {{path/to/file}}`
- 使用分离式签名验证已签名的文件:
`gpgv {{path/to/signature}} {{path/to/file}}`
- 在 keyrings 列表中添加一个文件(一个导出的钥匙也算作一个 keyring
`gpgv --keyring {{path/to/keyring_file}} {{path/to/signature}} {{path/to/file}}`