Here is obfuscated pure MD5, ready to put in .megasig :)
Input is on stdin, output is hexadecimal hash. Rules for this golf round are: code must be /^[\t\n -~]$/, input length < 2**32.
It's just a fuse for your ideas, because it will be massively squeezed after someone recalls generative polynomial for MD5 constants. Meanwhile feel free to shave strokes here and there.
#!perl -lp0777 BEGIN{$^H++}@Y=@R[-4..-1]if@R=unpack V68,unpack u,uc q{` M>*1juu:wq^c;<"`D[lz]P:\/?/4jQh='$t8Pj`&51Ow8f(!ik_=$b[%;__^^ Muur)(A&0:Y-qf/v.0wff(0Bt26(E'O9`lt#`45i>)JK'MnE=$"_64q1$`H'F MH=C(^]/GylWa(=8'-\.'#=7T[11:107IXZGxh^_\v0)O9xI,*Hu".?k_@?9q mar)Ag6t,..7]1.j^i*g/wDm@2[Ov<+r_ol9^FRCz)Z'JA3#ou`4=B`0yt-39 My9g;yoA\ha]e5js$1"(i])?_*d.g(y2k.:"3_,-96V62S`r/??3o_]%=A(5/ m?JaoX.8l_a1#`:.a$0a.@gy3]s7r.kv[tm<jd=.&zp$c16>)j\wo_mRzf'94 ",a};$_.=v128;//;for(/\C{57,64}/g,pack a56V,$',8*y///c-8){@V= unpack V16,$_.v0 x8;@_=@Y;for$K(0..3){$I=(0,1,5)[$K];($D,$A,$ B,$C)=@_[-$_|-4..2],$_[-$_&3]=(($D+=($A&$B|~$A&$C,$A&$C|$B&~$ C,$A^$B^$C,$B^($A|~$C))[$K]+$V[$I&15]+$R[$K*16+$_])<<($N=ord( (GlqvEIn4DkPWfjOU=~/./g)[$K*4+$_%4])%32)|2**$N-1&$D>>32-$N)+$ A,$I+=(1,5,3,7)[$K]for 0..15}map$_+=shift@_,@Y}$_=unpack H64, pack V4,@Y
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pure golfed MD5
by locked_user mtve (Deacon) on Apr 06, 2003 at 13:54 UTC |