aboutsummaryrefslogtreecommitdiffstats
path: root/jsaccess/encrypt.sh
blob: 9635cbbc4681105ebbc48d599101f759ae8b33e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

TMP=./jsa-encrypt.tmp

if [ $# -ne 2 ]; then
	echo "usage: encrypt.sh <in-file> <out-file>"
	exit 1
fi
in=$1
out=$2

base64 -w0 $in > $TMP
openssl enc -e -a -aes-256-cbc -in $TMP -out $out ||exit $?
rm $TMP
echo "created $out OK"