MD5 is a cryptographic one way hash algorithm. These classes compute MD5 for Java Strings, byte arrays, or streams. MD5 is now considered a weak algorithm. New applications should consider more secure one way hashes.
This class takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given pre-specified target message digest. The MD5 algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.
This class is based on work by Santeri Paavolainen. and RFC1321. This implementation is several times faster and much more memory efficient than Santeri's implementation.