mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
offline encrypt/decryption section
This commit is contained in:
@@ -180,18 +180,38 @@ Create a separate ASCII signature file for the original file.
|
|||||||
gpg --armor --detach-sign file.txt
|
gpg --armor --detach-sign file.txt
|
||||||
|
|
||||||
|
|
||||||
## Encrypt File
|
## Encrypt / Decrypt Files
|
||||||
|
|
||||||
```
|
Encryption protects a file so that only the intended recipient can
|
||||||
gpg -e -r RECIPIENT file.txt
|
read it. Decryption restores the original file using your private key.
|
||||||
```
|
|
||||||
|
Create a test file:
|
||||||
|
|
||||||
|
echo "This is a test file for gpg training." > file.txt
|
||||||
|
|
||||||
|
|
||||||
## Decrypt File
|
### Encrypt File
|
||||||
|
|
||||||
```
|
Encrypt a file for a specific recipient. Replace RECIPIENT with the
|
||||||
gpg -d file.txt.gpg
|
recipient email or key ID. This command also signs it (`-s`) and
|
||||||
```
|
encrypts the output as plain ASCII (`--armor`).
|
||||||
|
|
||||||
|
gpg --armor -e -s -r RECIPIENT file.txt
|
||||||
|
|
||||||
|
This creates:
|
||||||
|
|
||||||
|
file.txt.asc
|
||||||
|
|
||||||
|
|
||||||
|
### Decrypt File
|
||||||
|
|
||||||
|
Decrypt a file that was encrypted to you.
|
||||||
|
|
||||||
|
gpg -d file.txt.asc > decrypted.txt
|
||||||
|
|
||||||
|
This creates:
|
||||||
|
|
||||||
|
decrypted.txt
|
||||||
|
|
||||||
|
|
||||||
## Set Trust Levels
|
## Set Trust Levels
|
||||||
|
|||||||
Reference in New Issue
Block a user