Created
January 24, 2022 07:58
-
-
Save mryhryki/deb08ffaec7a571e73a64d99bc74b7a6 to your computer and use it in GitHub Desktop.
AES-256-CBC with OpenSSL
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
| #!/usr/bin/env bash | |
| export PASS="(Your Password)" | |
| function encrypt() { | |
| openssl enc -e -aes-256-cbc -pass "env:PASS" -iter 100 | base64 | |
| } | |
| function decrypt() { | |
| base64 --decode | openssl enc -d -aes-256-cbc -iter 100 -pass "env:PASS" | |
| } | |
| cat - | decrypt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment