Skip to content

Instantly share code, notes, and snippets.

@brianunlam
Last active December 23, 2022 06:44
Show Gist options
  • Save brianunlam/5261e919b6c60172bbaa10825db01e7c to your computer and use it in GitHub Desktop.
Save brianunlam/5261e919b6c60172bbaa10825db01e7c to your computer and use it in GitHub Desktop.
# tar before encrypting
tar -cf archive.tar -C /path/to/directory file1 file2
# encrypt
openssl enc -aes-256-cbc -salt -in <input file> -out <output file>
# decrypt
openssl enc -d -aes-256-cbc -in <encrypted file> -out <decrypted file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment