Generate MD5 hash of a string on the Terminal

While working on a Gravatar integration. I needed to generate a md5 hash of the test email address. Surprisingly enough, this was not as intuitiv as I though it would be. Keeping a reference here for my future self:

$ echo -n "" | md5sum