Forked from robert2d/bash-cli-openssl-stdin-encryption
Last active
May 23, 2019 11:27
-
-
Save omerfsen/5d0d9afedd150d29adacf777468a21e2 to your computer and use it in GitHub Desktop.
Bash $STDIN Encryption with openssl and aes256
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 STDIN with Salt "045667221ABCDFFF", Password from STDIN | |
$ echo "message" | openssl enc -aes-256-cbc -a -S "045667221ABCDFFF" -pass pass:TEST | |
U2FsdGVkX18EVmciGrzf/1pWNVmPZ5FLXa+v68TZGGg= | |
# Decrypt STDIN with Salt "045667221ABCDFFF", Password from STDIN | |
$ echo "U2FsdGVkX18EVmciGrzf/1pWNVmPZ5FLXa+v68TZGGg=" | openssl enc -aes-256-cbc -a -d -S "045667221ABCDFFF" -pass pass:TEST | |
message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment