Skip to content

Instantly share code, notes, and snippets.

@3vincent
Created February 26, 2023 00:14
Show Gist options
  • Save 3vincent/5cbeb3da9d817db395896cca85acb5ee to your computer and use it in GitHub Desktop.
Save 3vincent/5cbeb3da9d817db395896cca85acb5ee to your computer and use it in GitHub Desktop.
Encrypt files with GnuPG/gpg

Encrypt files with GPG / GnuPG

ENCRYPT

$ echo 'mySuperPassword'| gpg --output someEncrypted.data --symmetric --cipher-algo AES256 --pinentry-mode loopback --passphrase-fd 0 myData.txt

DECRYPT

$ echo 'mySuperPassword' | gpg --decrypt --output myData.txt --pinentry-mode loopback --passphrase-fd 0 someEncrypted.data 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment