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