function md5(string, key, raw) {
    if (!key) {
      if (!raw) {
        return hexMD5(string)
      }
      return rawMD5(string)
    }
    if (!raw) {
      return hexHMACMD5(key, string)
    }
    return rawHMACMD5(key, string)
  }
Calculates MD5 value for a given string.
If a key is provided, calculates the HMAC-MD5 value.
Returns a Hex encoded string unless the raw argument is given.

@param {string} string Input string
@param {string} [key] HMAC key
@param {boolean} [raw] Raw output switch
@returns {string} MD5 output