m_lonbits(23) = clng(16777215) m_lonbits(24) = clng(33554431) m_lonbits(25) = clng(67108863) m_lonbits(26) = clng(134217727) m_lonbits(27) = clng(268435455) m_lonbits(28) = clng(536870911) m_lonbits(29) = clng(1073741823) m_lonbits(30) = clng(2147483647)
m_l2power(0) = clng(1) m_l2power(1) = clng(2) m_l2power(2) = clng(4) m_l2power(3) = clng(8) m_l2power(4) = clng(16) m_l2power(5) = clng(32) m_l2power(6) = clng(64) m_l2power(7) = clng(128) m_l2power(8) = clng(256) m_l2power(9) = clng(512) m_l2power(10) = clng(1024) m_l2power(11) = clng(2048) m_l2power(12) = clng(4096) m_l2power(13) = clng(8192) m_l2power(14) = clng(16384) m_l2power(15) = clng(32768) m_l2power(16) = clng(65536) m_l2power(17) = clng(131072) m_l2power(18) = clng(262144) m_l2power(19) = clng(524288) m_l2power(20) = clng(1048576) m_l2power(21) = clng(2097152) m_l2power(22) = clng(4194304) m_l2power(23) = clng(8388608) m_l2power(24) = clng(16777216) m_l2power(25) = clng(33554432) m_l2power(26) = clng(67108864) m_l2power(27) = clng(134217728) m_l2power(28) = clng(268435456) m_l2power(29) = clng(536870912) m_l2power(30) = clng(1073741824)
dim x dim k dim aa dim bb dim cc dim dd dim a dim b dim c dim d
const s11 = 7 const s12 = 12 const s13 = 17 const s14 = 22 const s21 = 5 const s22 = 9 const s23 = 14 const s24 = 20 const s31 = 4 const s32 = 11 const s33 = 16 const s34 = 23 const s41 = 6 const s42 = 10 const s43 = 15 const s44 = 21
x = converttowordarray(smessage)
a = &h67452301 b = &hefcdab89 c = &h98badcfe d = &h10325476
for k = 0 to ubound(x) step 16 aa = a bb = b cc = c dd = d
md5_ff a, b, c, d, x(k + 0), s11, &hd76aa478 md5_ff d, a, b, c, x(k + 1), s12, &he8c7b756 md5_ff c, d, a, b, x(k + 2), s13, &h242070db md5_ff b, c, d, a, x(k + 3), s14, &hc1bdceee md5_ff a, b, c, d, x(k + 4), s11, &hf57c0faf md5_ff d, a, b, c, x(k + 5), s12, &h4787c62a md5_ff c, d, a, b, x(k + 6), s13, &ha8304613 md5_ff b, c, d, a, x(k + 7), s14, &hfd469501 md5_ff a, b, c, d, x(k + 8), s11, &h698098d8 md5_ff d, a, b, c, x(k + 9), s12, &h8b44f7af md5_ff c, d, a, b, x(k + 10), s13, &hffff5bb1 md5_ff b, c, d, a, x(k + 11), s14, &h895cd7be md5_ff a, b, c, d, x(k + 12), s11, &h6b901122 md5_ff d, a, b, c, x(k + 13), s12, &hfd987193 md5_ff c, d, a, b, x(k + 14), s13, &ha679438e md5_ff b, c, d, a, x(k + 15), s14, &h49b40821
md5_gg a, b, c, d, x(k + 1), s21, &hf61e2562 md5_gg d, a, b, c, x(k + 6), s22, &hc040b340 md5_gg c, d, a, b, x(k + 11), s23, &h265e5a51 md5_gg b, c, d, a, x(k + 0), s24, &he9b6c7aa md5_gg a, b, c, d, x(k + 5), s21, &hd62f105d |