Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save glagola/134b86f3b59f46b5ecd9c67318c66ac1 to your computer and use it in GitHub Desktop.
Save glagola/134b86f3b59f46b5ecd9c67318c66ac1 to your computer and use it in GitHub Desktop.
Simple text encryption/decryption with openssl
echo -n "That's the text" | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt | openssl base64 > /tmp/a
Encrypt with interactive password. Encrypted message is base64-encoded afterwards.
cat /tmp/a | openssl base64 -d | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -d
Base-64 decode and decrypt message with interactive password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment