From ab5a731d2c8f2f56cc6017b418969b8d78c21fed Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Mon, 3 Jun 2019 23:02:45 +0200 Subject: [PATCH] gpg2: Add page (#3074) --- pages/common/gpg2.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/common/gpg2.md diff --git a/pages/common/gpg2.md b/pages/common/gpg2.md new file mode 100644 index 0000000000..48247fcda5 --- /dev/null +++ b/pages/common/gpg2.md @@ -0,0 +1,32 @@ +# gpg + +> GNU Privacy Guard 2. +> More information: . + +- List imported keys: + +`gpg2 --list-keys` + +- Encrypt a specified file for a specified recipient, writing the output to a new file with `.gpg` appended: + +`gpg2 --encrypt --recipient {{alice@example.com}} {{path/to/doc.txt}}` + +- Encrypt a specified file with only a passphrase, writing the output to a new file with `.gpg` appended: + +`gpg2 --symmetric {{path/to/doc.txt}}` + +- Decrypt a specified file, writing the result to the standard output: + +`gpg2 --decrypt {{path/to/doc.txt.gpg}}` + +- Import a public key: + +`gpg2 --import {{path/to/public_key.gpg}}` + +- Export the public key of a specified email address to the standard output: + +`gpg2 --export --armor {{alice@example.com}}` + +- Export the private key with a specified email address to the standard output: + +`gpg2 --export-secret-keys --armor {{alice@example.com}}`