OpenSSL is an effective cryptography toolbox. Many of us have used OpenSSL for making RSA Private Keys or CSR (Certificate Signing Request). However, did you realize that you can use OpenSSL to encrypt files or messages? This article will assist you in how to encrypt messages and files using OpenSSL.
Encrypt and Decrypt Messages
The following command will encrypt the message “Welcome to Technical World” using Base64 Encoding:
# echo "Welcome to Technical World" | openssl enc -base64
enc: Encoding with Ciphers
-base64: Base64 Encoding
To decrypt the message we need to reverse the order and use -d option for decryption.