]> git.scottworley.com Git - overonion/blame - double-overonion
Double overonion
[overonion] / double-overonion
CommitLineData
673e2d68
SW
1#!/bin/bash
2
3if (( $# != 3));then
4 echo "usage: double-overonion e|d keyfile1 keyfile2"
5 exit 1
6fi
7mode=$1
8if [[ "$mode" != e && "$mode" != d ]];then
9 echo "Use 'e' for encrypt or 'd' for decrypt"
10 exit 1
11fi
12keyfile1=$2
13keyfile2=$3
14
15function oo() {
16 "$(dirname "$0")/overonion" "$mode" "$@"
17}
18
19if [[ "$mode" == e ]];then
20 oo "$keyfile2" | reverse | oo "$keyfile1"
21else
22 oo "$keyfile1" | reverse | oo "$keyfile2"
23fi