I recently had to create an MD5 hash for some test code I was writing. With some persistent googling I ran across http://code.google.com/p/crypto-js/ which is a fantastic set of library for javascript crypto. I was easily able to integrate it into my javascript.
A simple Crypto.MD5() call is all that's necessary to run a quick MD5 hash. SHA1 and other popular cryptos are available as well.