The script used the following parameters:
- -m The mechanism you want to use: Either enc for encryption or dec for decryption
- -s The string, folder, file you want to encrypt or decrypt
- Make sure Openssl is installed: https://www.howtoforge.com/tutorial/how-to-install-openssl-from-source-on-linux/
- Clone this repository
- Make the script executable
sudo chmod -x encrypt_decrypt.sh
- Run the script
./encrypt_decrypt.sh -m enc -s "This is a sample string" <<< SuperS3curePassw0rd!
./encrypt_decrypt.sh -m dec -s "U2FsdGVkX1/mgl7Z+Y1cmNATJD/CnTHEFLlKhEwwUlpw8YYchYDoTAzMFGI20bIR" <<< SuperS3curePassw0rd!
- v0.2: Made the script more secure by not having the password as parameter but prompting the password