A small class implementing Ron Rivest's MD5 hashing algorithm.
The class is based on the code written by Colin Plumb in 1993 (my understanding is that no copyright is claimed and that this code is in the public domain).
Compute MD5 hash for a file or byte array:
Everything is static, so you don't need to instantiate any class.
If you are handling sensitive data you may want to "clean" the md5Context struct before leaving the hashFile() method. You can use a simple memset(context, 0, sizeof(context)) for this purpose.
Colin Plumb's original implementation is indianness-aware. I removed all the calls to a function called byteReverse() as I didn't need Big Indian CPU support (sorry Motorola-CPU freaks ;).