Skip to content

Instantly share code, notes, and snippets.

@mryhryki
Created January 24, 2022 07:58
Show Gist options
  • Save mryhryki/deb08ffaec7a571e73a64d99bc74b7a6 to your computer and use it in GitHub Desktop.
Save mryhryki/deb08ffaec7a571e73a64d99bc74b7a6 to your computer and use it in GitHub Desktop.
AES-256-CBC with OpenSSL
#!/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