Skip to content

Instantly share code, notes, and snippets.

@briangershon
Created May 28, 2022 02:44
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 briangershon/a466ffa5f50a57dc9b3c41167ed1a4ce to your computer and use it in GitHub Desktop.
Save briangershon/a466ffa5f50a57dc9b3c41167ed1a4ce to your computer and use it in GitHub Desktop.
Encrypt files to send via https://transfer.sh (or other services)

These worked for me locally:

encrypt:

cat tshirt.png | openssl enc -aes-256-cbc -a -salt -p > test.enc

decrypt:

cat test.enc | openssl aes-256-cbc -d -a -out tshirt2.png

encrypt:

cat tshirt.png | openssl enc -aes-256-cbc -a -salt -p | curl -X PUT --upload-file "-" https://transfer.sh/tshirt.png.enc

decrypt:

Download the file manually via transfer.sh link then run cat test.enc | openssl aes-256-cbc -d -a -out tshirt2.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment