OS X has a tool for computing the md5 hash of a file -- just type md5 filename in the Terminal window. However, I wanted to use the stronger sha1 hash algorithm, but there is no sha1 tool. It turns out that you can use openssl, which comes with OS X, to do this. In the Terminal window, type openssl sha1 filename.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040223091330721