nntrn / save

https://nntrn.github.io/save/
2 stars 0 forks source link

encrypt files with gpg #1

Closed nntrn closed 1 month ago

nntrn commented 1 year ago
echo 'helloooooo' >password.txt
SECRET_PASSPHRASE=hello

# encrypt file (creates password.txt.gpg)
gpg --symmetric --cipher-algo AES256 password.txt

# decrypt
gpg --quiet --batch --yes --decrypt --passphrase="$SECRET_PASSPHRASE" --output /tmp/password.txt password.txt.gpg

Source: https://docs.github.com/en/actions/security-guides/encrypted-secrets

nntrn commented 1 year ago
$ file --mime password.txt.gpg
password.txt.gpg: application/octet-stream; charset=binary