Created
September 1, 2024 19:40
-
-
Save pcuci/d4b57a2254edb375224cebaf3e58cca1 to your computer and use it in GitHub Desktop.
Encrypt/Decrypt with a password one-liners
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
read -s -p "Password: " PASS && echo -e "\nEncrypted data: $(echo -n ${DATA} | openssl enc -aes-256-cbc -pbkdf2 -iter 10000 -a -salt -k "$PASS")" | |
read -s -p "Password: " PASS && read -p "Enter encrypted data: " ENCRYPTED_DATA && echo $ENCRYPTED_DATA | openssl enc -aes-256-cbc -d -pbkdf2 -iter 10000 -a -salt -k "$PASS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment