private methods 
Calculate the MD5 of a raw string
971556
function rstr(s) {
        s = (utf8) ? utf8Encode(s) : s;
        return binl2rstr(binl(rstr2binl(s), s.length * 8));
      }
35558
function _HMAC_MD5($key, $data, $raw_output = FALSE)
    {
        if (strlen($key) > 64) {
            $key = pack('H32', md5($key));
        }

        if (strlen($key) < 64) {
            $key = str_pad($key, 64, chr(0));
        }

        $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64);
        $k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64);

        $inner  = pack('H32', md5($k_ipad . $data));
        $digest = md5($k_opad . $inner, $raw_output);

        return $digest;
    }
962995
public static String md5(final String message) {
        byte[] res;

        try {
            MessageDigest instance = MessageDigest.getInstance("MD5");
            instance.reset();
            instance.update(message.getBytes());
            res = instance.digest();

        } catch (final NoSuchAlgorithmException ex) {
            throw new RuntimeException(ex);
        }

        StringBuilder hexString = new StringBuilder();
        for (byte resByte : res) {
            hexString.append(Integer.toString((resByte & 0xff) + 0x100, 16).substring(1));
        }

        return hexString.toString();
    }
679545
static String md5(String input) {
    if (input == null || input.length() == 0) {
      throw new IllegalArgumentException("Input string must not be blank.");
    }
    try {
      MessageDigest algorithm = MessageDigest.getInstance("MD5");
      algorithm.reset();
      algorithm.update(input.getBytes());
      byte[] messageDigest = algorithm.digest();

      StringBuilder hexString = new StringBuilder();
      for (byte messageByte : messageDigest) {
        hexString.append(Integer.toHexString((messageByte & 0xFF) | 0x100).substring(1, 3));
      }
      return hexString.toString();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
1253007
def file_md5(self, file_name):
        """"""
        with open(file_name, "rb") as f:
            file_contents = f.read()
            file_hash = hashlib.md5(file_contents).hexdigest()
        return file_hash
1216976
function (user, password, salt) {
  var inner = md5(password + user)
  var outer = md5(Buffer.concat([Buffer.from(inner), salt]))
  return 'md5' + outer
}
356320
def md5(self):
        
        hasher = hashlib.md5()
        for key in sorted(self.data.keys()):
            hasher.update(self.data[key].md5().encode('utf-8'))
        md5 = hasher.hexdigest()
        return md5
1151477
def md5hash(self):
        """"""
        digest = hashlib.md5(self.content).digest()
        return b64_string(digest)
701099
function md5ToHexEncodedArray(input) {
  var i;
  var x;
  var output = [];
  var length32 = input.length * 32;
  var hexTab = '0123456789abcdef';
  var hex;

  for (i = 0; i < length32; i += 8) {
    x = (input[i >> 5] >>> (i % 32)) & 0xFF;

    hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16);

    output.push(hex);
  }
  return output;
}
652894
function getMD5text(part) {
    var message = '';
    var constants = part.constants.map(function(field) {
      return field.type + ' ' + field.name + '=' + field.raw;
    }).join('\n');

    var fields = part.fields.map(function(field) {
      if (field.messageType) {
        return field.messageType.md5 + ' ' + field.name;
      }
      else {
        return field.type + ' ' + field.name;
      }
    }).join('\n');

    message += constants;
    if (message.length > 0 && fields.length > 0) {
      message += "\n";
    }
    message += fields;
    return message;
  }
10922
def md5(self):
        
        hash_ = hashlib.md5()
        with self.open("rb") as inf:
            block = inf.read(4096)
            while block:
                hash_.update(block)
                block = inf.read(4096)

        return hash_.hexdigest()
768876
private static String md5(byte[] buffer) {
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            md.update(buffer);
            byte[] digest = md.digest();
            return new String(FlexBase64.encodeBytes(digest, 0, digest.length, false), StandardCharsets.US_ASCII);
        } catch (NoSuchAlgorithmException e) {
            // Should never happen
            throw new InternalError("MD5 not supported on this platform");
        }
    }
1143693
def get_md5_from_hexdigest(self, md5_hexdigest):
        
        import binascii
        digest = binascii.unhexlify(md5_hexdigest)
        base64md5 = base64.encodestring(digest)
        if base64md5[-1] == '\n':
            base64md5 = base64md5[0:-1]
        return (md5_hexdigest, base64md5)
991173
public static String digestMD5(InputStream inputStream) {
        int size = 4096;
        int readLen = 32;
        StringBuilder md5String = new StringBuilder();
        try {
            byte[] buffer = new byte[size];
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            int len;
            while ((len = inputStream.read(buffer, 0, size)) != -1) {
                md5.update(buffer, 0, len);
            }
            BigInteger bigInteger = new BigInteger(1, md5.digest());
            md5String.append(bigInteger.toString(16));
            if (md5String.length() < readLen) {
                int j = readLen - md5String.length();
                for (int i = 0; i < j; i++) {
                    md5String.insert(0, "0");
                }
            }
        } catch (NoSuchAlgorithmException | IOException e) {
            throw new IllegalArgumentException(e);
        }
        return md5String.toString();
    }
1203675
def md5sum(data):
    
    if six.PY3:  # pragma: no cover
        return hashlib.md5(data.encode('utf-8')).hexdigest()
    else:  # pragma: no cover
        return hashlib.md5(data).hexdigest()
762235
public static String md5Encrypt(String str) {
		byte[] bytes = null;
		try {
			bytes = str.getBytes("UTF-8");
		} catch (Exception e) {
			bytes = str.getBytes();
		}

		byte messageDigest[] = null;
		synchronized (m_md5) {
			m_md5.update(bytes);
			messageDigest = m_md5.digest();
		}

		StringBuffer hexString = new StringBuffer();
		int d;
		for (int i = 0; i < messageDigest.length; i++) {
			d = messageDigest[i];
			if (d < 0)
				d += 256;
			if (d < 16)
				hexString.append("0");
			hexString.append(Integer.toHexString(d));
		}
		return hexString.toString();
	}
706215
function md5Hash(buf) {
  var md5 = crypto.createHash('md5');
  md5.update(buf);
  return md5.digest('hex');
}