This code calculates the MD5 hash of an input message. The code is not mine, it's a part of a submission by Joseph Smugeresky. However, since it's the only working code I could found without the need of DLLs, I'm submitting it right here.
Using it is really easy:
Hash = CalculateMD5(InputMessage)