-
-
Save CatTail/28d1b9c10af2829f965e to your computer and use it in GitHub Desktop.
Encrypt & Decrypt single message with openssl AES-256
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 | |
# usage: enc [-d] <message> | |
if [ $# == 2 ]; then | |
echo $2 | openssl enc -e -aes-256-cbc -a -salt $1 | |
else | |
echo $1 | openssl enc -e -aes-256-cbc -a -salt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment