Created
October 2, 2018 08:29
-
-
Save soygul/9d0d0b32ce2b3c43ecff9f8b4a2c8dde to your computer and use it in GitHub Desktop.
Encrypt/Decrypt Files Using OpenSSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encrypt | |
openssl enc -in test.txt -aes-256-cbc -pass pass:mypass -out test.txt.enc | |
# decrypt | |
openssl enc -in test.txt.enc -d -aes-256-cbc -pass pass:mypass -out test.txt | |
# valid password sources (as of OpenSSL 1.1.1, see 'man openssl' for more recent info): | |
# -pass pass:mypass | |
# -pass env:somevar | |
# -pass file:somepathname | |
# -pass fd:number | |
# -pass stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment