Skip to content

Instantly share code, notes, and snippets.

@simcap
Created April 14, 2019 09:58
Show Gist options
  • Save simcap/b9673746ef77764d80c7e6e0347b2b63 to your computer and use it in GitHub Desktop.
Save simcap/b9673746ef77764d80c7e6e0347b2b63 to your computer and use it in GitHub Desktop.
# From Linux Mag N.255 - article from Frederic Leroy
##
# Using zip/unzip (7zip recommended by CNIL)
# encrypt
zip -e archive.zip file.txt file-2.txt
# decrypt
unzip -e archive.zip
##
# Using gpg2
# encrypt
gpg2 --symmetric file.txt
# decrypt
gpg2 file.gpg
##
# Using openssl
# encrypt
openssl enc -aes-256-cbc -in file.txt -out file.crypted
# decrypt
openssl enc -d -aes-256-cbc -in file.crypted -out file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment