When I call openssl sha1 from the command line
echo "00" | xxd -r -p | openssl dgst -sha1
the output I am receive is
(stdin)= 5ba93c9db0cff93f52b521d7420e43f6eda2784f
But the NIST Vector output is:
MD = da39a3ee5e6b4b0d3255bfef95601890afd80709
Can anyone please explain this?
-n
withecho
to prevent adding a trailing new line. You can test this by writing in the terminal$ echo 'foo'
and$ echo -n 'foo'
. $\endgroup$