crhash: sha1: add test vectors
[crhash.git] / test.sh
blob2ba36d9465e230448e26c37b397b97bed3c6e4a1
1 #!/bin/sh
2 cd t
3 for T in md5 sha1 whirlpool; do
4 for M in $T-*.m; do
5 DIGEST1=$(../crhash -t $T $M)
6 DIGEST2=$(cat $(basename $M .m).$T)
7 if test "$DIGEST1" = "$DIGEST2"; then
8 echo "PASS $T $M"
9 else
10 echo "FAIL $T $M $DIGEST1 $DIGEST2"
12 done
13 done