MD5 by rst76

import Bits
m@main=do x<-getLine;putStrLn$map(!"0123456789abcdef").take 8.g=<<zipWith(+)s(foldl(\[a,b,c,d]i->[d,b+rotate(a+i&h![d?(b.&.c?d),c?(d.&.b?c),b?c?d,c?(-d-1.|.b)]+floor(abs(sin$toEnum$i+1)*4^h)+i&h![i,5*i+1,3*i+5,7*i]%h!f(take 56(map fromEnum x++128:t)++length x*8:t))(i&h![468,126,560,282]&(5^i%4)%5+i%4*5+4),b,c])s[0..63]);m
f(a:b:c:d:e)=a+b*2^8+c*4^8+d*8^8:f e
g x=x&h%h:x%h:g(x&256)
s=2562383102#271733878
x#y=[-x-1,-y-1,x,y]
x!y=y!!x
(?)=xor
(%)=mod
(&)=div
t=0:t
h=16

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page