Tuesday, February 21, 2012

MD5 Hash function in Javascript

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.