3 if [ -z "$srcdir" ] ; then
12 # Relies on division rounding down; breaks if
13 # $expected contains more than one space.
14 length=`expr "$expected" : '.*' / 2`
16 # Delete carriage return characters, needed when testing with
18 printf "%s" "$password" | $EMULATOR ../tools/nettle-pbkdf2 \
19 -i "$iters" -l "$length" "$salt" | tr -d '\r' > test1.out
20 echo "$expected" | tr -d '\r' > test2.out
22 if cmp test1.out test2.out ; then
29 test_pbkdf2 passwd salt 1 "55ac046e56e3089f ec1691c22544b605"
30 test_pbkdf2 Password NaCl 80000 "4ddcd8f60b98be21 830cee5ef22701f9"