Skip to content

Instantly share code, notes, and snippets.

@CatTail
Created September 16, 2014 23:09
Show Gist options
  • Save CatTail/28d1b9c10af2829f965e to your computer and use it in GitHub Desktop.
Save CatTail/28d1b9c10af2829f965e to your computer and use it in GitHub Desktop.
Encrypt & Decrypt single message with openssl AES-256
#! /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