mirror of
https://git.sr.ht/~sircmpwn/mkproof
synced 2024-12-03 23:18:13 +01:00
87d922c6c6
git-subtree-dir: argon2i git-subtree-mainline: 3e7a084af1a451c4d92dc09d3dfccec3b8c2fb4e git-subtree-split: 440ceb9612d5a20997e3e12728542df2de713ca4
50 lines
696 B
Bash
Executable File
50 lines
696 B
Bash
Executable File
#!/bin/sh
|
|
|
|
for opttest in "" "OPTTEST=1"
|
|
do
|
|
if [ "" = "$opttest" ]
|
|
then
|
|
printf "Default build\n"
|
|
else
|
|
printf "Force OPTTEST=1\n"
|
|
fi
|
|
|
|
make genkat $opttest > /dev/null
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit $?
|
|
fi
|
|
|
|
i=0
|
|
for version in 16 19
|
|
do
|
|
for type in i d id
|
|
do
|
|
i=$(($i+1))
|
|
|
|
printf "argon2$type v=$version: "
|
|
|
|
if [ 19 -eq $version ]
|
|
then
|
|
kats="kats/argon2"$type
|
|
else
|
|
kats="kats/argon2"$type"_v"$version
|
|
fi
|
|
|
|
./genkat $type $version > tmp
|
|
if diff tmp $kats
|
|
then
|
|
printf "OK"
|
|
else
|
|
printf "ERROR"
|
|
exit $i
|
|
fi
|
|
printf "\n"
|
|
done
|
|
done
|
|
done
|
|
|
|
rm -f tmp
|
|
|
|
exit 0
|