X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/ba6e6b64033b1f9de49feccb5c9cd438354481f7..0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a:/symm/aes-trans diff --git a/symm/aes-trans b/symm/aes-trans new file mode 100755 index 0000000..a869d16 --- /dev/null +++ b/symm/aes-trans @@ -0,0 +1,36 @@ +#! /bin/sh + +prog=`echo $0 | sed 's:.*/::'` +alg=${1?}; shift +lc=`echo $alg | tr A-Z a-z` + +cat < 1) { + y = y substr(x, length(x) - 1); + x = substr(x, 1, length(x) - 2); + } + return y; +} + +BEGIN { FS = "="; } +/^KEY=/ { key = mangle($2); } +/^PT=/ { pt = mangle($2); } +/^CT=/ { + ct = mangle($2); + printf(" %s\n %s\n %s;\n", key, pt, ct); +} +' +echo } +