{"ScriptPreparationCode":"function fastHash(s) {\r\n for (var h = 5381, l = s.length, i = 0; i \u003C l; i\u002B\u002B) {\r\n h = ((h \u003C\u003C 5) \u002B h) ^ s.charCodeAt(i);\r\n }\r\n return h \u003E\u003E\u003E 0;\r\n}\r\n\r\nfunction md5_new(inputString) {\r\n var hc=\u00220123456789abcdef\u0022;\r\n function rh(n) {var j,s=\u0022\u0022;for(j=0;j\u003C=3;j\u002B\u002B) s\u002B=hc.charAt((n\u003E\u003E(j*8\u002B4))\u00260x0F)\u002Bhc.charAt((n\u003E\u003E(j*8))\u00260x0F);return s;}\r\n function ad(x,y) {var l=(x\u00260xFFFF)\u002B(y\u00260xFFFF);var m=(x\u003E\u003E16)\u002B(y\u003E\u003E16)\u002B(l\u003E\u003E16);return (m\u003C\u003C16)|(l\u00260xFFFF);}\r\n function rl(n,c) {return (n\u003C\u003Cc)|(n\u003E\u003E\u003E(32-c));}\r\n function cm(q,a,b,x,s,t) {return ad(rl(ad(ad(a,q),ad(x,t)),s),b);}\r\n function ff(a,b,c,d,x,s,t) {return cm((b\u0026c)|((~b)\u0026d),a,b,x,s,t);}\r\n function gg(a,b,c,d,x,s,t) {return cm((b\u0026d)|(c\u0026(~d)),a,b,x,s,t);}\r\n function hh(a,b,c,d,x,s,t) {return cm(b^c^d,a,b,x,s,t);}\r\n function ii(a,b,c,d,x,s,t) {return cm(c^(b|(~d)),a,b,x,s,t);}\r\n function sb(x) {\r\n var i;var nblk=((x.length\u002B8)\u003E\u003E6)\u002B1;var blks=new Array(nblk*16);for(i=0;i\u003Cnblk*16;i\u002B\u002B) blks[i]=0;\r\n for(i=0;i\u003Cx.length;i\u002B\u002B) blks[i\u003E\u003E2]|=x.charCodeAt(i)\u003C\u003C((i%4)*8);\r\n blks[i\u003E\u003E2]|=0x80\u003C\u003C((i%4)*8);blks[nblk*16-2]=x.length*8;return blks;\r\n }\r\n var i,x=sb(\u0022\u0022\u002BinputString),a=1732584193,b=-271733879,c=-1732584194,d=271733878,olda,oldb,oldc,oldd;\r\n for(i=0;i\u003Cx.length;i\u002B=16) {olda=a;oldb=b;oldc=c;oldd=d;\r\n a=ff(a,b,c,d,x[i\u002B 0], 7, -680876936);d=ff(d,a,b,c,x[i\u002B 1],12, -389564586);c=ff(c,d,a,b,x[i\u002B 2],17, 606105819);\r\n b=ff(b,c,d,a,x[i\u002B 3],22,-1044525330);a=ff(a,b,c,d,x[i\u002B 4], 7, -176418897);d=ff(d,a,b,c,x[i\u002B 5],12, 1200080426);\r\n c=ff(c,d,a,b,x[i\u002B 6],17,-1473231341);b=ff(b,c,d,a,x[i\u002B 7],22, -45705983);a=ff(a,b,c,d,x[i\u002B 8], 7, 1770035416);\r\n d=ff(d,a,b,c,x[i\u002B 9],12,-1958414417);c=ff(c,d,a,b,x[i\u002B10],17, -42063);b=ff(b,c,d,a,x[i\u002B11],22,-1990404162);\r\n a=ff(a,b,c,d,x[i\u002B12], 7, 1804603682);d=ff(d,a,b,c,x[i\u002B13],12, -40341101);c=ff(c,d,a,b,x[i\u002B14],17,-1502002290);\r\n b=ff(b,c,d,a,x[i\u002B15],22, 1236535329);a=gg(a,b,c,d,x[i\u002B 1], 5, -165796510);d=gg(d,a,b,c,x[i\u002B 6], 9,-1069501632);\r\n c=gg(c,d,a,b,x[i\u002B11],14, 643717713);b=gg(b,c,d,a,x[i\u002B 0],20, -373897302);a=gg(a,b,c,d,x[i\u002B 5], 5, -701558691);\r\n d=gg(d,a,b,c,x[i\u002B10], 9, 38016083);c=gg(c,d,a,b,x[i\u002B15],14, -660478335);b=gg(b,c,d,a,x[i\u002B 4],20, -405537848);\r\n a=gg(a,b,c,d,x[i\u002B 9], 5, 568446438);d=gg(d,a,b,c,x[i\u002B14], 9,-1019803690);c=gg(c,d,a,b,x[i\u002B 3],14, -187363961);\r\n b=gg(b,c,d,a,x[i\u002B 8],20, 1163531501);a=gg(a,b,c,d,x[i\u002B13], 5,-1444681467);d=gg(d,a,b,c,x[i\u002B 2], 9, -51403784);\r\n c=gg(c,d,a,b,x[i\u002B 7],14, 1735328473);b=gg(b,c,d,a,x[i\u002B12],20,-1926607734);a=hh(a,b,c,d,x[i\u002B 5], 4, -378558);\r\n d=hh(d,a,b,c,x[i\u002B 8],11,-2022574463);c=hh(c,d,a,b,x[i\u002B11],16, 1839030562);b=hh(b,c,d,a,x[i\u002B14],23, -35309556);\r\n a=hh(a,b,c,d,x[i\u002B 1], 4,-1530992060);d=hh(d,a,b,c,x[i\u002B 4],11, 1272893353);c=hh(c,d,a,b,x[i\u002B 7],16, -155497632);\r\n b=hh(b,c,d,a,x[i\u002B10],23,-1094730640);a=hh(a,b,c,d,x[i\u002B13], 4, 681279174);d=hh(d,a,b,c,x[i\u002B 0],11, -358537222);\r\n c=hh(c,d,a,b,x[i\u002B 3],16, -722521979);b=hh(b,c,d,a,x[i\u002B 6],23, 76029189);a=hh(a,b,c,d,x[i\u002B 9], 4, -640364487);\r\n d=hh(d,a,b,c,x[i\u002B12],11, -421815835);c=hh(c,d,a,b,x[i\u002B15],16, 530742520);b=hh(b,c,d,a,x[i\u002B 2],23, -995338651);\r\n a=ii(a,b,c,d,x[i\u002B 0], 6, -198630844);d=ii(d,a,b,c,x[i\u002B 7],10, 1126891415);c=ii(c,d,a,b,x[i\u002B14],15,-1416354905);\r\n b=ii(b,c,d,a,x[i\u002B 5],21, -57434055);a=ii(a,b,c,d,x[i\u002B12], 6, 1700485571);d=ii(d,a,b,c,x[i\u002B 3],10,-1894986606);\r\n c=ii(c,d,a,b,x[i\u002B10],15, -1051523);b=ii(b,c,d,a,x[i\u002B 1],21,-2054922799);a=ii(a,b,c,d,x[i\u002B 8], 6, 1873313359);\r\n d=ii(d,a,b,c,x[i\u002B15],10, -30611744);c=ii(c,d,a,b,x[i\u002B 6],15,-1560198380);b=ii(b,c,d,a,x[i\u002B13],21, 1309151649);\r\n a=ii(a,b,c,d,x[i\u002B 4], 6, -145523070);d=ii(d,a,b,c,x[i\u002B11],10,-1120210379);c=ii(c,d,a,b,x[i\u002B 2],15, 718787259);\r\n b=ii(b,c,d,a,x[i\u002B 9],21, -343485551);a=ad(a,olda);b=ad(b,oldb);c=ad(c,oldc);d=ad(d,oldd);\r\n }\r\n return rh(a)\u002Brh(b)\u002Brh(c)\u002Brh(d);\r\n}","TestCases":[{"Name":"fast","Code":"var x = fastHash(\u0022hello\u0022);","IsDeferred":false},{"Name":"md5","Code":"var x = md5_new(\u0022hello\u0022);","IsDeferred":false}]}