Skip to content

Instantly share code, notes, and snippets.

@kloudsamurai
Last active October 3, 2021 09:59
Show Gist options
  • Save kloudsamurai/60dae24a77a4f5a13b9a2354df4f9860 to your computer and use it in GitHub Desktop.
Save kloudsamurai/60dae24a77a4f5a13b9a2354df4f9860 to your computer and use it in GitHub Desktop.
Using GPG with a passphrase to encrypt and decrypt with AES256
# encrypt secret.txt
gpg --symmetric --yes --batch --cipher-algo AES256 --passphrase=XXXXX secret.txt && rm -f secret.txt
# decrypt secret.txt
gpg --decrypt --yes --batch --passphrase=XXXXX secret.txt.gpg > secret.txt && rm -f secret.txt.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment