From: Scott Worley Date: Fri, 20 Oct 2017 07:50:06 +0000 (-0700) Subject: Double overonion X-Git-Url: http://git.scottworley.com/overonion/commitdiff_plain/673e2d68a8813804502df1923a6c2f6e727e69a0 Double overonion --- diff --git a/double-overonion b/double-overonion new file mode 100755 index 0000000..afd4ebb --- /dev/null +++ b/double-overonion @@ -0,0 +1,23 @@ +#!/bin/bash + +if (( $# != 3));then + echo "usage: double-overonion e|d keyfile1 keyfile2" + exit 1 +fi +mode=$1 +if [[ "$mode" != e && "$mode" != d ]];then + echo "Use 'e' for encrypt or 'd' for decrypt" + exit 1 +fi +keyfile1=$2 +keyfile2=$3 + +function oo() { + "$(dirname "$0")/overonion" "$mode" "$@" +} + +if [[ "$mode" == e ]];then + oo "$keyfile2" | reverse | oo "$keyfile1" +else + oo "$keyfile1" | reverse | oo "$keyfile2" +fi