1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 15:22:08 +02:00
tldr/pages.zh/common/age.md
K.B.Dharun Krishna 5c26174aa9
pages/*: update links and more info link script (#11390)
* pages/*: update links and more info link script

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup: reformat code

* ax-webapp: fix link

* curl: fix false positive

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2023-11-06 23:14:12 +05:30

1.1 KiB

age

一个简单、现代、安全的文件加密工具。 更多信息:https://github.com/FiloSottile/age.

  • 生成一个可以用密码短语(passphrase)解密的加密文件:

age --passphrase --output {{路径/到/已加密文件}} {{路径/到/未加密文件}}

  • 生成一个密钥对,将私钥保存到一个未加密的文件,并将公钥打印到标准输出:

age-keygen --output {{路径/到/文件}}

  • 用一个或多个公钥加密一个文件,这些公钥以字面形式输入:

age --recipient {{公钥_1}} --recipient {{公钥_2}} {{路径/到/未加密文件}} --output {{路径/到/已加密文件}}

  • 用收件人文件中指定的一个或多个公钥来加密一个文件:

age --recipients-file {{路径/到/收件人文件}} {{路径/到/未加密文件}} --output {{路径/到/已加密文件}}

  • 用密码短语解密一个文件:

age --decrypt --output {{路径/到/已解密文件}} {{路径/到/已加密文件}}

  • 用私钥文件解密一个文件:

age --decrypt --identity {{路径/到/私钥文件}} --output {{路径/到/已解密文件}} {{路径/到/已加密文件}}