Created
November 23, 2018 15:39
-
-
Save receptor/c9e53d255877758ce510c4899a986a33 to your computer and use it in GitHub Desktop.
OpenSSL encrypt & decrypt one-liners
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 | |
$ echo "my secret message" | openssl aes-256-cbc -a -salt | |
enter aes-256-cbc encryption password: | |
Verifying - enter aes-256-cbc encryption password: | |
U2FsdGVkX19T5h74/9HOtWBX4WoIggVKksYf7L1WBso= | |
DECRYPT | |
$ echo "U2FsdGVkX19T5h74/9HOtWBX4WoIggVKksYf7L1WBso=" | openssl aes-256-cbc -a -d -salt | |
enter aes-256-cbc decryption password: | |
my secret message | |
NON-INTERACTIVE | |
$ echo "sensitive data" | openssl aes-256-cbc -a -salt -pass pass:secret > ./store | |
$ cat ./store | openssl aes-256-cbc -a -d -salt -pass pass:secret | |
sensitive data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment