I think u better to use openssl to ensure the responses are the same.
openssl
tar cvf foo.tar ./foo openssl sha1 foo.tar