repo.or.cz
/
crhash.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
crhash: sha1: add test vectors
[crhash.git]
/
test.sh
blob
2ba36d9465e230448e26c37b397b97bed3c6e4a1
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
"
11
fi
12
done
13
done