Created
October 30, 2021 08:03
-
-
Save cy-lee/6d855e42fae3ddc542ca3ad47d950d27 to your computer and use it in GitHub Desktop.
Simple string encode/decode using OpenSSL 1.1.1f in command line
This file contains hidden or 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
# encode "asdf", use aes-256-cbc cipher, password is login, output format is base64 encoded | |
echo asdf | openssl enc -aes-256-cbc -base64 -pass pass:login -pbkdf2 | |
# decrypt base64 string back to string | |
echo U2FsdGVkX1//XT7B0wrXH0+3hqMz7jJ+6ss5QStdI/k= | openssl enc -d -aes-256-cbc -base64 -pass pass:login -pbkdf2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment