Skip to content

Instantly share code, notes, and snippets.

@Kein1945
Created December 19, 2017 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kein1945/52f9d68652da2e7d1ad08017523c4ef3 to your computer and use it in GitHub Desktop.
Save Kein1945/52f9d68652da2e7d1ad08017523c4ef3 to your computer and use it in GitHub Desktop.
Encrypt and decrypt with aes algorithm with openssl cli in bash
encrypt() {
echo -n "$1" | openssl enc -e -aes-256-cbc -a -salt
}
decrypt (){
echo "$1" | openssl enc -e -aes-256-cbc -a -d -salt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment