add GPG example

Caffeine Fueled 2025-10-16 16:31:12 +00:00
parent 51d517a402
commit 652c30677e

50
Usage.md Normal file

@ -0,0 +1,50 @@
## Encryption with GPG
_Replace `curl` with any other tool that can send HTTP POST requests. Example on Linux._
**Upload**
String:
: `echo "Cheers" | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com`
File:
: `gpg --symmetric --armor file.txt -o - | curl -X POST --data-binary @- https://linedump.com`
Command:
: `ip -br a | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com`
**Download**
Save to file:
: `curl -s https://linedump.com/{paste_id} | gpg --decrypt -o output.txt`
### Example
**1. Upload**
```bash
echo "Cheers" | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com
https://linedump.com/xGuiMp
Delete with HTTP POST: https://linedump.com/xGuiMp?token=x2NTpUh_JH7rwCdZ3gFDDAsCmAACkpYhZAaW0PP8
```
**2. Checking encrypted content the server sees**
```bash
curl https://linedump.com/xGuiMp
-----BEGIN PGP MESSAGE-----
jA0ECQMKjt5qCUrYoIj/0jwBPzikbS57PpJ0QR+5nlKXppAfkyVci7mI5kR3+zmC
HOQYztfu4JXW1sEGaH3OPD0KlmBwpWIpbuSU2VE=
=uRk1
-----END PGP MESSAGE-----
```
**3. Download and decryption**
```bash
curl -s https://linedump.com/xGuiMp | gpg --decrypt
gpg: AES256.CFB encrypted data
gpg: encrypted with 1 passphrase
Cheers
```