Last active
April 29, 2020 16:36
-
-
Save rafaelsq/60ae94086970b4dbd2e36c77e7955d48 to your computer and use it in GitHub Desktop.
Encode/Decode file 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
#!/bin/bash | |
echo "limon" > encdec.dec | |
echo "Encrypt" | |
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 10000 -salt -in encdec.dec -out encdec.enc | |
ls encdec.* | |
# encdec.enc encdec.dec | |
rm encdec.dec | |
ls encdec.* | |
# encdec.enc | |
echo "Decrypt" | |
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -d -in encdec.enc -out encdec.dec | |
ls encdec.* | |
# encdec.enc encdec.dec | |
cat encdec.dec | |
# limon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment