From 76105832f5680535aec62444483ec69cb06ccf60 Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 17 Jun 2000 12:12:05 +0000 Subject: [PATCH] Convert AES test vector files to mLib format. --- tests/aes-trans | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 tests/aes-trans diff --git a/tests/aes-trans b/tests/aes-trans new file mode 100755 index 0000000..a869d16 --- /dev/null +++ b/tests/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 } + -- 2.11.0