-
-
Save deepakkoirala/7fc74fabee11b5b3c4382312a50db479 to your computer and use it in GitHub Desktop.
Simple text encryption/decryption with 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
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a | |
Encrypt with interactive password. Encrypted message is base64-encoded afterwards. | |
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a -k "MySuperPassword" | |
Encrypt with specified password. Encrypted message is base64-encoded afterwards. | |
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc | |
Base-64 decode and decrypt message with interactive password. | |
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc -k "MySuperPassword" | |
Base-64 decode and decrypt message with specified password. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment