Skip to content

Instantly share code, notes, and snippets.

@gesellix
Created March 26, 2016 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gesellix/de06390f6bc162046ffa to your computer and use it in GitHub Desktop.
Save gesellix/de06390f6bc162046ffa to your computer and use it in GitHub Desktop.

sharing secrets

There's no need for a big application when all you want is to securely share some files or other data. OpenSSL is ubiquitious, so we can rely on the command line tools.

The following examples encrypt/decrypt the secrets.txt file base64 encoded into a secrets.txt.enc file. The password is entered interactively. For details see the man page of openssl enc.

encrypt

openssl enc -aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc

decrypt

openssl enc -d -aes-256-cbc -a -salt -in secrets.txt.enc > secrets.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment