PajHome-MD5-min

Biblio MD5 Decrypt-Encrypt minifier

이 스크립트는 직접 설치해서 쓰는 게 아닙니다. 다른 스크립트가 메타 명령 // @require https://update.greasyfork.org/scripts/40003/262502/PajHome-MD5-min.js(으)로 포함하여 쓰는 라이브러리입니다.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
/*
 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
 * Digest Algorithm, as defined in RFC 1321.
 * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for more info.
 *
 * Optimised and compress by K-mik@Z
 */
/* jslint                bitwise: true                                                         */
/* jslint                esnext: true                                                          */
/* jslint                moz: true                                                             */
/* jslint                expr: true                                                            */
/* jslint                sub:true                                                              */
/* jslint                multistr: true                                                        */
!function(r){var t=0,d='';function hex_md5(r){return rstr2hex(rstr_md5(r));}function rstr_md5(r){return binl2rstr(binl_md5(rstr2binl(r),8*r.length));}function rstr_hmac_md5(r,t){var d=rstr2binl(r);d.length>16&&(d=binl_md5(d,8*r.length));for(var n=Array(16),_=Array(16),m=0;m<16;m++){n[m]=909522486^d[m],_[m]=1549556828^d[m];}var h=binl_md5(n.concat(rstr2binl(t)),512+8*t.length);return binl2rstr(binl_md5(_.concat(h),640));}function rstr2hex(r){for(var d,n=t?'0123456789ABCDEF':'0123456789abcdef',_='',m=0;m<r.length;m++){d=r.charCodeAt(m),_+=n.charAt(d>>>4&15)+n.charAt(15&d);}return _;}function rstr2b64(r){for(var t='',n=r.length,_=0;_<n;_+=3){for(var m=r.charCodeAt(_)<<16|(_+1<n?r.charCodeAt(_+1)<<8:0)|(_+2<n?r.charCodeAt(_+2):0),h=0;h<4;h++){8*_+6*h>8*r.length?t+=d:t+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(m>>>6*(3-h)&63);}}return t;}function rstr2any(r,t){var d,n,_,m,h,e=t.length,f=Array(Math.ceil(r.length/2));for(d=0;d<f.length;d++){f[d]=r.charCodeAt(2*d)<<8|r.charCodeAt(2*d+1);}var a=Math.ceil(8*r.length/(Math.log(t.length)/Math.log(2))),i=Array(a);for(n=0;n<a;n++){for(h=Array(),m=0,d=0;d<f.length;d++){m=(m<<16)+f[d],m-=(_=Math.floor(m/e))*e,(h.length>0||_>0)&&(h[h.length]=_);}i[n]=m,f=h;}var o='';for(d=i.length-1;d>=0;d--){o+=t.charAt(i[d]);}return o;}function rstr2binl(r){for(var t=Array(r.length>>2),d=0;d<t.length;d++){t[d]=0;}for(var n=0;n<8*r.length;n+=8){t[n>>5]|=(255&r.charCodeAt(n/8))<<n%32;}return t;}function binl2rstr(r){for(var t='',d=0;d<32*r.length;d+=8){t+=String.fromCharCode(r[d>>5]>>>d%32&255);}return t;}function binl_md5(r,t){r[t>>5]|=128<<t%32,r[14+(t+64>>>9<<4)]=t;for(var d=1732584193,n=-271733879,_=-1732584194,m=271733878,h=0;h<r.length;h+=16){var e=d,f=n,a=_,i=m;n=md5_ii(n=md5_ii(n=md5_ii(n=md5_ii(n=md5_hh(n=md5_hh(n=md5_hh(n=md5_hh(n=md5_gg(n=md5_gg(n=md5_gg(n=md5_gg(n=md5_ff(n=md5_ff(n=md5_ff(n=md5_ff(n,_=md5_ff(_,m=md5_ff(m,d=md5_ff(d,n,_,m,r[h+0],7,-680876936),n,_,r[h+1],12,-389564586),d,n,r[h+2],17,606105819),m,d,r[h+3],22,-1044525330),_=md5_ff(_,m=md5_ff(m,d=md5_ff(d,n,_,m,r[h+4],7,-176418897),n,_,r[h+5],12,1200080426),d,n,r[h+6],17,-1473231341),m,d,r[h+7],22,-45705983),_=md5_ff(_,m=md5_ff(m,d=md5_ff(d,n,_,m,r[h+8],7,1770035416),n,_,r[h+9],12,-1958414417),d,n,r[h+10],17,-42063),m,d,r[h+11],22,-1990404162),_=md5_ff(_,m=md5_ff(m,d=md5_ff(d,n,_,m,r[h+12],7,1804603682),n,_,r[h+13],12,-40341101),d,n,r[h+14],17,-1502002290),m,d,r[h+15],22,1236535329),_=md5_gg(_,m=md5_gg(m,d=md5_gg(d,n,_,m,r[h+1],5,-165796510),n,_,r[h+6],9,-1069501632),d,n,r[h+11],14,643717713),m,d,r[h+0],20,-373897302),_=md5_gg(_,m=md5_gg(m,d=md5_gg(d,n,_,m,r[h+5],5,-701558691),n,_,r[h+10],9,38016083),d,n,r[h+15],14,-660478335),m,d,r[h+4],20,-405537848),_=md5_gg(_,m=md5_gg(m,d=md5_gg(d,n,_,m,r[h+9],5,568446438),n,_,r[h+14],9,-1019803690),d,n,r[h+3],14,-187363961),m,d,r[h+8],20,1163531501),_=md5_gg(_,m=md5_gg(m,d=md5_gg(d,n,_,m,r[h+13],5,-1444681467),n,_,r[h+2],9,-51403784),d,n,r[h+7],14,1735328473),m,d,r[h+12],20,-1926607734),_=md5_hh(_,m=md5_hh(m,d=md5_hh(d,n,_,m,r[h+5],4,-378558),n,_,r[h+8],11,-2022574463),d,n,r[h+11],16,1839030562),m,d,r[h+14],23,-35309556),_=md5_hh(_,m=md5_hh(m,d=md5_hh(d,n,_,m,r[h+1],4,-1530992060),n,_,r[h+4],11,1272893353),d,n,r[h+7],16,-155497632),m,d,r[h+10],23,-1094730640),_=md5_hh(_,m=md5_hh(m,d=md5_hh(d,n,_,m,r[h+13],4,681279174),n,_,r[h+0],11,-358537222),d,n,r[h+3],16,-722521979),m,d,r[h+6],23,76029189),_=md5_hh(_,m=md5_hh(m,d=md5_hh(d,n,_,m,r[h+9],4,-640364487),n,_,r[h+12],11,-421815835),d,n,r[h+15],16,530742520),m,d,r[h+2],23,-995338651),_=md5_ii(_,m=md5_ii(m,d=md5_ii(d,n,_,m,r[h+0],6,-198630844),n,_,r[h+7],10,1126891415),d,n,r[h+14],15,-1416354905),m,d,r[h+5],21,-57434055),_=md5_ii(_,m=md5_ii(m,d=md5_ii(d,n,_,m,r[h+12],6,1700485571),n,_,r[h+3],10,-1894986606),d,n,r[h+10],15,-1051523),m,d,r[h+1],21,-2054922799),_=md5_ii(_,m=md5_ii(m,d=md5_ii(d,n,_,m,r[h+8],6,1873313359),n,_,r[h+15],10,-30611744),d,n,r[h+6],15,-1560198380),m,d,r[h+13],21,1309151649),_=md5_ii(_,m=md5_ii(m,d=md5_ii(d,n,_,m,r[h+4],6,-145523070),n,_,r[h+11],10,-1120210379),d,n,r[h+2],15,718787259),m,d,r[h+9],21,-343485551),d=safe_add(d,e),n=safe_add(n,f),_=safe_add(_,a),m=safe_add(m,i);}return Array(d,n,_,m);}function md5_cmn(r,t,d,n,_,m){return safe_add(function bit_rol(r,t){return r<<t|r>>>32-t;}(safe_add(safe_add(t,r),safe_add(n,m)),_),d);}function md5_ff(r,t,d,n,_,m,h){return md5_cmn(t&d|~t&n,r,t,_,m,h);}function md5_gg(r,t,d,n,_,m,h){return md5_cmn(t&n|d&~n,r,t,_,m,h);}function md5_hh(r,t,d,n,_,m,h){return md5_cmn(t^d^n,r,t,_,m,h);}function md5_ii(r,t,d,n,_,m,h){return md5_cmn(d^(t|~n),r,t,_,m,h);}function safe_add(r,t){var d=(65535&r)+(65535&t);return(r>>16)+(t>>16)+(d>>16)<<16|65535&d;}r.hex_md5=hex_md5,r.b64_md5=function b64_md5(r){return rstr2b64(rstr_md5(r));},r.any_md5=function any_md5(r,t){return rstr2any(rstr_md5(r),t);},r.hex_hmac_md5=function hex_hmac_md5(r,t){return rstr2hex(rstr_hmac_md5(r,t));},r.b64_hmac_md5=function b64_hmac_md5(r,t){return rstr2b64(rstr_hmac_md5(r,t));},r.any_hmac_md5=function any_hmac_md5(r,t,d){return rstr2any(rstr_hmac_md5(r,t),d);},r.rstr_md5=rstr_md5,r.rstr_hmac_md5=rstr_hmac_md5,r.rstr2hex=rstr2hex,r.rstr2b64=rstr2b64,r.rstr2any=rstr2any,r.rstr2b64=rstr2b64,r.md5_vm_test=function md5_vm_test(){return'900150983cd24fb0d6963f7d28e17f72'==hex_md5('abc').toLowerCase();},r.str2rstr_utf8=function str2rstr_utf8(r){for(var t,d,n='',_=-1;++_<r.length;){t=r.charCodeAt(_),d=_+1<r.length?r.charCodeAt(_+1):0,55296<=t&&t<=56319&&56320<=d&&d<=57343&&(t=65536+((1023&t)<<10)+(1023&d),_++),t<=127?n+=String.fromCharCode(t):t<=2047?n+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));}return n;},r.str2rstr_utf16le=function str2rstr_utf16le(r){for(var t='',d=0;d<r.length;d++){t+=String.fromCharCode(255&r.charCodeAt(d),r.charCodeAt(d)>>>8&255);}return t;},r.str2rstr_utf16be=function str2rstr_utf16be(r){for(var t='',d=0;d<r.length;d++){t+=String.fromCharCode(r.charCodeAt(d)>>>8&255,255&r.charCodeAt(d));}return t;};}(this);