```javascript
function md5(content) {
let rotateLeft = (x, n) => (x << n) | (x >>> (32 - n));
let hexChars = "0123456789abcdef";
let words = [];
let length = content.length * 8;
content += String.fromCharCode(0x80);
while (content.length % 64 !== 56) {
content += String.fromCharCode(0);
}
content += String.fromCharCode(length & 0xff);
content += String.fromCharCode((length >>> 8) & 0xff);
content += String.fromCharCode((length >>> 16) & 0xff);
content += String.fromCharCode((length >>> 24) & 0xff);
for (let i = 0; i < content.length; i += 4) {
words.push(content.charCodeAt(i) | (content.charCodeAt(i + 1) << 8) | (content.charCodeAt(i + 2) << 16) | (content.charCodeAt(i + 3) << 24));
}
let a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476;
for (let i = 0; i < words.length; i += 16) {
let aa = a, bb = b, cc = c, dd = d;
for (let j = 0; j < 64; j++) {
let f, g;
if (j < 16) {
f = (b & c) | ((~b) & d);
g = j;
} else if (j < 32) {
f = (d & b) | ((~d) & c);
g = (5 * j + 1) % 16;
} else if (j < 48) {
f = b ^ c ^ d;
g = (3 * j + 5) % 16;
} else {
f = c ^ (b | (~d));
g = (7 * j) % 16;
}
let temp = d;
d = c;
c = b;
b = b + rotateLeft((a + f + 0x5a827999 + words[i + g]) & 0xffffffff, [7, 12, 17, 22][Math.floor(j / 16)]);
a = temp;
}
for (let j = 0; j < 64; j++) {
let f, g;
if (j < 16) {
f = (b & c) | ((~b) & d);
g = (1 + 5 * j) % 16;
} else if (j < 32) {
f = (d & b) | ((~d) & c);
g = (5 + 3 * j) % 16;
} else if (j < 48) {
f = b ^ c ^ d;
g = (3 + 7 * j) % 16;
} else {
f = c ^ (b | (~d));
g = 7 * j % 16;
}
let temp = d;
d = c;
c = b;
b = b + rotateLeft((a + f + 0x6ed9eba1 + words[i + g]) & 0xffffffff, [5, 9, 14, 20][Math.floor(j / 16)]);
a = temp;
}
for (let j = 0; j < 64; j++) {
let f, g;
if (j < 16) {
f = (b & c) | ((~b) & d);
g = (5 + 3 * j) % 16;
} else if (j < 32) {
f = (d & b) | ((~d) & c);
g = (3 + 7 * j) % 16;
} else if (j < 48) {
f = b ^ c ^ d;
g = 7 * j % 16;
} else {
f = c ^ (b | (~d));
g = 5 * j % 16;
}
let temp = d;
d = c;
c = b;
b = b + rotateLeft((a + f + 0x8f1bbcdc + words[i + g]) & 0xffffffff, [4, 11, 16, 23][Math.floor(j / 16)]);
a = temp;
}
for (let j = 0; j < 64; j++) {
let f, g;
if (j < 16) {
f = (b & c) | ((~b) & d);
g = (7 * j) % 16;
} else if (j < 32) {
f = (d & b) | ((~d) & c);
g = 5 * j % 16;
} else if (j < 48) {
f = b ^ c ^ d;
g = (3 * j + 7) % 16;
} else {
f = c ^ (b | (~d));
g = (7 * j + 1) % 16;
}
let temp = d;
d = c;
c = b;
b = b + rotateLeft((a + f + 0xca62c1d6 + words[i + g]) & 0xffffffff, [6, 10, 15, 21][Math.floor(j / 16)]);
a = temp;
}
a = (a + aa) & 0xffffffff;
b = (b + bb) & 0xffffffff;
c = (c + cc) & 0xffffffff;
d = (d + dd) & 0xffffffff;
}
return hexChars.charAt((a >> 4) & 0xf) + hexChars.charAt(a & 0xf) + hexChars.charAt((a >> 12) & 0xf) + hexChars.charAt((a >> 8) & 0xf) +
hexChars.charAt((a >> 20) & 0xf) + hexChars.charAt((a >> 16) & 0xf) + hexChars.charAt((a >> 28) & 0xf) + hexChars.charAt((a >> 24) & 0xf) +
hexChars.charAt((b >> 4) & 0xf) + hexChars.charAt(b & 0xf) + hexChars.charAt((b >> 12) & 0xf) + hexChars.charAt((b >> 8) & 0xf) +
hexChars.charAt((b >> 20) & 0xf) + hexChars.charAt((b >> 16) & 0xf) + hexChars.charAt((b >> 28) & 0xf) + hexChars.charAt((b >> 24) & 0xf) +
hexChars.charAt((c >> 4) & 0xf) + hexChars.charAt(c & 0xf) + hexChars.charAt((c >> 12) & 0xf) + hexChars.charAt((c >> 8) & 0xf) +
hexChars.charAt((c >> 20) & 0xf) + hexChars.charAt((c >> 16) & 0xf) + hexChars.charAt((c >> 28) & 0xf) + hexChars.charAt((c >> 24) & 0xf) +
hexChars.charAt((d >> 4) & 0xf) + hexChars.charAt(d & 0xf) + hexChars.charAt((d >> 12) & 0xf) + hexChars.charAt((d >> 8) & 0xf) +
hexChars.charAt((d >> 20) & 0xf) + hexChars.charAt((d >> 16) & 0xf) + hexChars.charAt((d >> 28) & 0xf) + hexChars.charAt((d >> 24) & 0xf);
}
```
</code>